Global Traffic Manager (GTM) 3.0 provides DNS-based traffic scheduling for high availability. This guide walks through a primary/backup disaster recovery setup where GTM automatically switches DNS responses to a backup address when the primary address fails. After recovery, a predefined policy determines whether traffic switches back.
Solution architecture
Two data centers host the service: a primary data center handles daily traffic, and a backup data center serves as the failover target. If the primary data center becomes unavailable due to network issues or a service interruption, GTM directs traffic to the backup data center.
GTM processes traffic in four stages:
Health check -- GTM continuously monitors the service addresses in the
Primary-DCandBackup-DCaddress pools.DNS query -- A user initiates a request. The local DNS sends a query for the service domain name to GTM.
Traffic scheduling -- If the primary address pool is healthy, GTM returns its IP address. If the primary pool fails, GTM returns the backup pool's IP address instead.
Fault recovery -- After the primary pool recovers, GTM either switches traffic back (Preemptive Mode) or keeps traffic at the backup pool (Non-Preemptive Mode), depending on the configured mode.
Prerequisites
Before you begin, make sure that you have:
An Access Domain hosted by Public Zone, with at least one DNS Server IP Address in Available status
Primary and backup services deployed with public IP addresses (for example, Shanghai data center at
121.21.*.*and Hangzhou data center at139.3.*.*)
Step 1: Create an access domain
Go to the Global Traffic Manager console.
On the Access Domain tab, click Create Access Domain.
In the dialog box, select Custom Scenario.
On the Access Domain configuration page, click the access domain name icon and select Basic Configuration.

Configure the following settings.
Setting Value Access Domain Enter an access domain name, for example, gtm.your-domain.com. If the drop-down list is empty, purchase a domain name or go to Public Zone to add a third-party domain name.Billing Method Select Pay-as-you-go. Record Type Select A. This guide uses IPv4 addresses. TTL (Seconds) Keep the default value of 30. A shorter TTL speeds up DNS failover but increases DNS query volume.Enabed State Keep the default disabled status. Enable it after all configurations are complete. Remarks Enter a description. 
Step 2: Add primary and backup address pools
An address pool is a collection of service addresses. Create one pool for the primary data center and one for the backup.
Click the Access Domain icon, and then click Add Address Pool.

Configure the following settings. For details, see Address pool configuration.
Setting Value Address Pool Name Primary-DCType IPv4 Health Status Conditions Select At least one address in the address pool is available. The pool is considered healthy if at least one address passes health checks. Enabed State Enable 
Repeat these steps to create a backup address pool named
Backup-DC.
Step 3: Add service addresses
Click the icon for the address pool you created, and then click Add Address.

Configure the following settings. For details, see Address configuration.
Setting Value Address Name Primary-Server-01Type IPv4 Type Enter the public IP address of the server in the primary data center. Health Check Enable. Configure the probe protocol (such as HTTP or HTTPS), the path (such as /health), and the expected response code. GTM uses this configuration to determine whether the service is available.
Repeat these steps to add a service address to the
Backup-DCaddress pool. The result looks like the following figure.
Step 4: Configure the load balancing policy
GTM applies two layers of traffic scheduling: a policy between address pools and a policy among addresses within each pool. The pool-level policy is applied first, then the address-level policy.
Between address pools
Click the policy above the address pools and select Load Balancing Policy.

Configure the following settings.
Setting Value Load Balancing Policy Global Availability Preemptive Mode Preemptive Mode 
Click Sequence No. > Adjust Sequence Number.

Drag the address pools to set the priority order. Place the primary address pool first.
Within an address pool
In this guide, each address pool contains only one service address. Keep the default Round Robin policy.

Step 5: Enable the access domain and verify DNS resolution
A newly configured access domain is disabled by default. After completing all settings, enable it manually.
Verify that all health checks are passing. If any red or orange alert indicators appear, troubleshoot the address health checks before proceeding.

Click the access domain name icon and select Enable.

In the confirmation dialog box, review the settings and submit the configuration.
Wait approximately 10 minutes for the configuration to take effect.
Verify DNS resolution
After the configuration takes effect, confirm that the access domain resolves to the expected IP address. Use the Network Probe Tool or run one of the following commands:
nslookup gtm.your-domain.comExpected output (example):
Server: <your-local-dns>
Address: <your-local-dns>#53
Non-authoritative answer:
Name: gtm.your-domain.com
Address: 121.21.*.*Alternatively, use dig:
dig gtm.your-domain.comExpected output (example):
;; ANSWER SECTION:
gtm.your-domain.com. 30 IN A 121.21.*.*The ANSWER SECTION should return the IP address of the primary address pool. The TTL value should match the value configured in Step 1 (default: 30 seconds).
Step 6: Configure a CNAME record for traffic steering
Point your service domain name to the Access Domain by creating a CNAME record. For example: home.example.com CNAME gtm.your-domain.com.
This guide uses a service domain name hosted by Public Zone. If your domain is hosted by another DNS provider, create the CNAME record with that provider instead.
Go to the Alibaba Cloud DNS - Public DNS console. Find the target domain name and click Settings.
Click Add Record and configure the following settings.
Setting Value Record Type CNAME Host Enter the host record for traffic steering. Value Enter the configured access domain name. 
If the service domain name already has A or AAAA records, adding a CNAME record causes a conflict. For more information, see DNS record conflict rules. To resolve the conflict:
Create the CNAME record in a disabled state.

During off-peak hours, disable the existing A or AAAA records.
Enable the CNAME record.
Billing
For pricing details, see Product Billing.