Global Traffic Manager (GTM) allows instant access to the nearest nodes and supports high concurrency load balancing and health checks. You can use GTM to perform failover or traffic switch based on health check results. These features allow you to implement active zone-disaster recovery and geo-disaster recovery with ease. GTM allows you to manage Alibaba Cloud and third-party IP addresses. This feature allows you to implement disaster recovery for applications that reside in a hybrid cloud.
GTM provides DNS-level service that sends specific service addresses to clients. Then, these clients can directly connect to the service addresses. GTM does not provide proxy, gateway, or application access service. Therefore, the statistics of network traffic between clients and application service are not displayed in the GTM console.
After you create a GTM instance, the system assigns a CNAME access domain name to the instance. To implement disaster recovery and smart access for application service, you must connect a service domain name that is accessed by visitors with the CNAME access domain name.
Principles
This topic uses the www.example.com website as an example.
1. After you create a GTM instance, the system assigns the gtm12345678.gtm-000.com CNAME access domain name to the instance.
2. Add the 1.1.XX.XX, 2.2.XX.XX, and 3.3.XX.XX IP addresses to the instance and enable the health check feature.
3. Connect the www.example.com service domain name with the gtm12345678.gtm-000.com CNAME access domain name by using a CNAME record.
Diagram
Procedure
A client queries the www.example.com service domain name on a local recursive DNS system.
If the local recursive DNS system does not cache the IP address of www.example.com, the system sends a DNS request to a DNS root server. The DNS root server returns the IP address of the .com DNS server to the local recursive DNS system based on the suffix of the domain name to be queried.
After the IP address of the .com DNS server is received, the local recursive DNS system sends a DNS request to query the IP address of www.example.com to the .com DNS server. After the .com DNS server receives the request, the .com DNS server returns the address of the DNS server that hosts example.com domain name to the local recursive DNS system. If Alibaba Cloud DNS is enabled for the domain name, the DNS server is an Alibaba Cloud DNS server.
After the local recursive DNS system receives the Alibaba Cloud DNS server address that is returned by the .com DNS server, the local recursive DNS system issues a DNS request to the Alibaba Cloud DNS server. This request is used to query the www.example.com domain name again. After the Alibaba Cloud DNS server receives the request, the Alibaba Cloud DNS server finds that the www.example.com domain is connected with the gtm12345678.gtm-000.com domain name by using a CNAME record. Then, the Alibaba Cloud DNS server returns the IP address of the gtm12345678.gtm-000.com domain name to the local recursive DNS system.
After the local recursive DNS server receives the IP address of the gtm12345678.gtm-000.com domain name, the local recursive DNS server issues a DNS request to a GTM DNS server. This request is used to query the gtm12345678.gtm-000.com domain name. After the GTM DNS server receives the request, the GTM DNS server returns the IP address of the required application service to the local recursive DNS system based on the predefined mechanism and policy.
The local recursive DNS server uses the IP address obtained through the last query request as the IP address of the www.example.com domain name. Then, the local recursive DNS system sends the IP address to the client and caches the IP address on the local server. The next time clients query the domain name, they can immediately obtain the IP address.
After a client receives the IP address that is returned by the local recursive DNS system, the client connects to the IP address. Then, the client can start to communicate with the application service.
System architecture
Diagram
Description
The following contents describe the modules that are included in the preceding system architecture and interactions between these modules.
The DNS module of the GTM system. This module allows user requests to be routed to the primary address pool set and secondary address pool set of an application service. Based on the predefined rules, user requests from regions in the Chinese mainland are routed to the primary address pool set of an application service. User requests from regions outside the Chinese mainland are routed to the secondary address pool set of an application service. The two address pool sets serve as a backup for each other.
The health check module of the GTM system. This module initiates health checks over ping, TCP, HTTP, or HTTPS. These health checks apply to the addresses of multiple application services in the address pools from different regions.
In the primary address pool set, if the address of an application service fails, the health check module accurately identifies the failure and interacts with the DNS module. Then, the DNS module removes the abnormal address from the address list of the application service. The address list is sent to visitors. If the health check module finds that the abnormal address of the application service recovers, the DNS module adds the address to the address list and sends the address list to visitors.
If the primary address pool set fails, GTM switches access traffic from regions in the Chinese mainland to the secondary address pool set based on the predefined switchover policy. If the secondary address pool set fails, GMT switches access traffic from regions outside the Chinese mainland to the secondary address pool set.
Based on the preceding features, GTM allows visitors to obtain the optimal application service and ensures business continuity.