How to implement failover in Alibaba Cloud DNS

Updated at:

You can use DNS to implement fault isolation or failover, ensuring service continuity when an IP address becomes unavailable.

Scenarios

Enterprise websites or applications typically use public zones to configure intelligent DNS resolution, improving access speed and quality across different Internet Service Providers (ISPs) or regions. For example, the intelligent DNS resolution configuration for the domain dns-example.com is as follows:

Record type

Host record

Query source

Record value

TTL

A

www

China Unicom

192.0.x.x

10 minutes

A

www

China Mobile

192.1.x.x

10 minutes

A

www

China default

192.2.x.x

10 minutes

The intelligent resolution effects are:

  • When Unicom users access the application through the domain name, it resolves to 192.0.x.x.

  • When Mobile users access the application through the domain name, it resolves to 192.1.x.x.

  • When other users access the application through the domain name, it resolves to the default address 192.2.x.x.

What impact will it have on users if the Unicom IP address 192.0.x.x becomes unavailable?

  • Unicom users cannot access the application through the domain name: Access failed.

  • When Mobile users access the application through the domain name, it resolves to 192.1.x.x.

  • When other users access the application through the domain name, it resolves to the default address 192.2.x.x.

How can the traffic of China Unicom users be automatically switched to the IP addresses of other ISPs when the IP address of China Unicom is unavailable?

You can use Global Traffic Manager (GTM) with authoritative DNS resolution to implement failover. GTM monitors IP addresses through health checks. When a failure is detected, GTM automatically switches domain name resolution to a backup IP address. For more information, see Use GTM to implement DNS resolution and failover based on ISP.