Scenarios
Website, game, video, and live streaming customers implement CDN acceleration to enable nearby access to origin content. These customers also have high requirements for business availability. Because CDN itself cannot detect the operational status of origin IP addresses, it cannot quickly switch user traffic to normal addresses during failures. Global Traffic Manager (GTM) can help enterprises implement traffic load balancing, fault detection, and automatic switchover.
Solutions
Both CDN and GTM provide services to users through CNAME domains. If users point the same subdomain to different CNAME domains simultaneously, one of the products will not function properly because authoritative DNS responds in a polling manner. However, many businesses need both domain acceleration and origin high availability. For scenarios requiring both CDN acceleration and GTM origin IP disaster recovery switching, we recommend users implement this through a serial configuration method.

Configuration methods
Steps overview
Global Traffic Manager configuration.
CDN acceleration configuration.
Resource preparation
Prepare a test domain: test.alidns.com.
Create a GTM instance.
Activate Alibaba Cloud CDN acceleration service.
Step 1: Global Traffic Manager configuration
Configure IPAM pool and enable health check
Access Cloud DNS - Global Traffic Manager. In the Global Traffic Manager instance list, find the destination instance and click the Operation area's Configure button.
On the Basic Configuration page, click Address Pool Configuration, then click Add Address Pool. Create 2 address pools as follows:
Address Pool Name
IP Address in Address Pool
Pattern
test1
1.1.XX.XX
Smart Return
test2
2.2.XX.XX
Smart Return

On the Address Pool Configuration page, click the "+" icon in front of the address pool to expand the address pool configuration, then click Health Check followed by Add. Complete the health check configuration.

Configure access policy
On the Basic Configuration page, select Geography-based Access Policy for Access Policy Type, and click the Configure button in this module.
Click Add Access Policy to add a new access policy with the following configuration:
Policy Name
Primary Address Pool Collection
Backup Address Pool Collection
DNS Request Source
Global
test1
test2
Global

Basic configuration
On the Basic Configuration page, click the Modify button below. In the dialog box that appears, complete the configuration for Instance Name, CNAME Access Domain, Business Domain, Global TTL, Alert Notification Group, and Alert Notification Method.

Step 2: Configure CDN acceleration
On the Basic Configuration tab of Global Traffic Manager, copy the CNAME Access Domain of GTM.
Log on to the CDN console, click Domain Names in the left-side navigation pane. On the Domain Names page, click the Add Domain Name button. Complete the configuration for Acceleration Region, Acceleration Domain, Business Type, and Origin Information according to your requirements.
NotePaste the copied GTM CNAME access domain into the Origin Domain Name field.
After adding the acceleration domain, the status will initially show as "Reviewing" or "Configuring". You need to wait for a few minutes until the status changes to Running. Then go to the Cloud DNS console to configure the CNAME record. Point the business domain test.alidns.com to the CDN CNAME domain through a CNAME record.
After adding the CNAME record, return to the Domain Names page in the CDN console. When the CNAME status shows as configured, it indicates that the business domain has been connected to CDN.