Scenarios
Global Traffic Manager (GTM) implements global disaster recovery not only in multiple regions and data centers but also in multiple clouds. You can use GTM to build a disaster recovery architecture. In such an architecture, users in different regions can access the nearest data centers. If one data center is down, the access traffic from users can be switched to other data centers that run as expected. This ensures service continuity.
Architecture

Prerequisites
The domain name
cloud-example.comis hosted by Alibaba Cloud DNS, and the business domain name that you want to connect to GTM iswww.cloud-example.com.NoteYou can also use GTM even if your business domain name is not hosted by Alibaba Cloud DNS. You need to add a canonical name (CNAME) record to point the business domain name to the access domain name of your GTM instance at the Domain Name System (DNS) service provider.
A GTM instance is purchased, such as
gtm-cn-35t3pmh**0h. If no instances are purchased, purchase an instance first.The intelligent DNS resolution results described in the following table are expected.
DNS request source
Application service address
Failover address
Chinese mainland (global)
223.5.XX.XX: on-premises data center
223.6.XX.XX: Alibaba Cloud data center in China (Hong Kong)
China (Hong Kong)
223.6.XX.XX: Alibaba Cloud data center in China (Hong Kong)
223.7.XX.XX: Huawei Cloud data center in Singapore
Outside the Chinese mainland
223.7.XX.XX: Huawei Cloud data center in Singapore
223.6.XX.XX: Alibaba Cloud data center in China (Hong Kong)
Procedure
Log on to the Alibaba Cloud DNS console.
In the left-side navigation pane, click Global Traffic Manager to go to the Global Traffic Manager 3.0 page.
On the Access Domain Name tab, click Create Access Domain Name.
In the Select Scenario dialog box that appears, click Custom Scenario.
On the Create Access Domain Name page, move the pointer over the icon of the access domain name, and click Basic Configuration.
In the Basic Access Domain Name Configuration panel, configure the parameters and click Submit. For more information about how to configure an access domain name, see Configure an access domain name.
On the Access Domain Name page, move the pointer over the address pool icon, and click Basic Configuration. In the Basic Configuration panel, configure the parameters and click Submit. For more information, see the Basic configuration parameters section of the Configure an address pool topic. Create three address pools named China (Hongkong), Overseas, and Global.
On the Access Domain Name page, move the pointer over the address pool that you created, and click Add Address. Add addresses to the three address pools as planned. In the Add Address panel, configure the parameters and select a Health Check Template. In this example, PING Template are used.
NoteIf no health check templates are created, click Quickly Add Detection Template to create a template. For more information, see Health check templates.

Move the pointer over the load balancing policy name below the icon of the access domain name, and click Configure Load Balancing Policy. In this example, the Load Balancing Policy for Address Pools parameter is set to Closest to Source to configure a policy based on geographical locations. For more information, see the Configure a policy for load balancing between address pools section of the GTM configuration process topic. In the Request Source Configuration panel for the China (Hong Kong) address pool, set the Request Source parameter to Aliyun_China (Hong Kong). Then, use the same way to set the Request Source parameter to Outside mainland China for the Overseas address pool, and Default for the Global address pool.
ImportantYou must configure the default line to prevent the failure to return addresses to clients when no DNS line is matched.
If the address pools configured for an intelligent DNS line are deemed unavailable, the addresses in the address pools configured for the default line are returned.
If all address pools are deemed unavailable, the addresses in the global address pool configured for the default line are returned based on the round-robin mechanism. If multiple address pools are configured for the default line, the non-empty address pool with the smallest sequence number is returned. If the default line is not configured, the non-empty address pool with the smallest sequence number is returned.

Move the pointer over the load balancing policy name below the address pool icon, and click Configure Load Balancing Policy. In this example, the Load Balancing Policy for Addresses parameter is set to Order and the Prior Resource Recovery Mode parameter is set to Preemptible Mode to implement primary/secondary disaster recovery. For more information, see the Parameters for configuring the policies of load balancing between addresses section of the Configure an address pool topic.
ImportantA smaller sequence number of an address specifies a higher DNS resolution priority. Addresses with larger sequence numbers are returned only when addresses with smaller sequence numbers are deemed unavailable.
When multiple address pools are configured for the same DNS request source, the addresses in the address pool with a smaller sequence number are first returned for the requests from the request source. When all address pools are deemed unavailable, all addresses in the non-empty address pool with a smaller sequence number are first returned.
ImportantThis example demonstrates the configuration procedure. If red or orange alert items appear in the actual configuration, check the address health status at the earliest opportunity.
Configure alert rules for the instance. For more information, see the Procedure section of the Configure alert settings topic.
On the Access Domain Name page, move the pointer over the icon of the access domain name, and then click Enable.
In the Confirm Access Domain Name Enabling message, confirm the access domain name and click OK.
ImportantIf a domain name record with the same name and the same type exists in the Authoritative DNS Resolution module of Alibaba Cloud DNS, the system first intelligently schedules and resolves DNS requests for this domain name based on the policy configured in GTM to implement advanced features such as traffic load balancing and failovers.
If you disable or delete this access domain name in GTM, requests for this domain name will be resolved by the Authoritative DNS Resolution module of Alibaba Cloud DNS.