Global Traffic Manager concepts
What is the difference between Global Traffic Manager (GTM) and Server Load Balancer (SLB)?
GTM uses DNS to resolve a domain name to multiple IP addresses. This process distributes application traffic by directing users to different IP addresses. GTM also uses health checks to dynamically update the IP addresses in DNS records, which enables fault isolation and failover. End users connect directly to the service IP addresses, not through GTM. In contrast, SLB acts as a proxy. It distributes user requests to different servers in real time. All traffic from end users must pass through the SLB instance.
Generally, you use SLB for load balancing within the same region. You use GTM to balance the load across multiple SLB instances in different regions.
The following table compares the two:
Item | Network Layer | Backend endpoint | Weighted round-robin | Cross-region complexities | Fault isolation time | Session persistence |
Global Traffic Manager | Layer 3 | Domain name, IP | Supported | Easy | Minutes | Not supported |
Server Load Balancer (SLB) | Layer 4, Layer 7 | IP | Supported | Difficult | Seconds | Supported |
What is the difference between Global Traffic Manager (GTM) and Alibaba Cloud DNS?
Alibaba Cloud DNS provides domain name resolution services. It converts domain names to IP addresses and supports various types of DNS records. GTM is built on intelligent DNS resolution and integrates health checks and failover features. GTM directs users to the nearest access point based on their geographic location and monitors the service status in real time.
Access domain names
Can multiple service domain names use the same GTM instance?
It depends.
If your service domain names resolve to the exact same set of IP addresses, you can point them to the same GTM access domain name using CNAME records. Otherwise, each service domain name requires a separate GTM instance.
1. Scenario for using the same GTM instance
The service domain name www.example.com resolves to 1.1.XX.XX and 2.2.XX.XX, and disaster recovery is required between these two IP addresses.
The service domain name test.example.com resolves to 1.1.XX.XX and 2.2.XX.XX, and disaster recovery is required between these two IP addresses.
In this scenario, both service domain names resolve to the same set of IP addresses. Therefore, you only need to purchase one GTM instance. Create a CNAME record for www.example.com and test.example.com. Set the record value to the GTM access domain name. For more information, see Access a domain name.
2. Scenario where you cannot use the same GTM instance
The service domain name www.example.com resolves to 1.1.XX.XX and 2.2.XX.XX, and disaster recovery is required between these two IP addresses.
The service domain name test.example.com resolves to 1.1.XX.XX and 3.3.XX.XX, and disaster recovery is required between these two IP addresses.
In this scenario, the two service domain names resolve to different sets of IP addresses. Therefore, each service domain name requires a separate GTM instance.
Can I access the CNAME access domain name of GTM directly from a URL?
Yes. The GTM access domain name is a URL that you can access directly. You can also use it as the CNAME record for your other service domain names.
How does GTM determine if an application service has failed?
GTM has an integrated application service monitoring feature and provides multiple monitoring nodes worldwide. You can use a combination of these monitoring nodes to trigger alerts. These alerts determine if a service-wide failure has occurred. You can monitor your application service using Ping, TCP, or HTTP(S) to detect failures.
Ping health check: Determines service failure based on packet loss rate and response time.
TCP health check: Determines service failure based on the response time of a port.
HTTP(S) health check: Determines service failure based on response time and return codes.
How long does it take for a GTM failover to take effect?
Our testing shows that when an application service fails, GTM Ultimate Edition can detect the failure and perform a failover in approximately one minute. The total time for network-wide recovery is the sum of the failure detection time and the network-wide propagation time.
Standard Edition can detect a failure and perform a failover in approximately three minutes:
Failure detection time: If the health check interval is 60 seconds, the TTL is 60 seconds, and the number of consecutive failures reaches 2, GTM can detect the failure and perform a failover in approximately three minutes.
Network-wide propagation time: GTM cannot guarantee the final propagation time across the entire network. The time depends on the TTL cache settings and network environments of different carriers.
Ultimate Edition can detect a failure and perform a failover in approximately one minute:
Failure detection time: If the health check interval is 15 seconds, the TTL is 1 second, and the number of consecutive failures reaches 3, GTM can detect the failure and perform a failover in approximately one minute.
Network-wide propagation time: GTM cannot guarantee the final propagation time across the entire network. The time depends on the TTL cache settings and network environments of different carriers.
Can I use domain names in a GTM address pool?
Yes. You can add IP addresses or domain names to a GTM address pool. However, you cannot have both IP addresses and domain names in the same address pool. If you add multiple domain names to an address pool, GTM polls them by default.
Does GTM support intelligent DNS resolution?
Yes. GTM has an integrated intelligent DNS resolution feature. You can use GTM to provide intelligent DNS resolution for users based on their geographic location, such as their carrier in China, region, continent, or country. This allows users from different networks or areas to access the nearest service node, which improves access speed.
Does GTM support session persistence?
No, it does not. GTM is a DNS-level management system. It uses DNS responses to route clients to the appropriate application service addresses. Clients connect directly to the application service IP addresses, not through GTM. Therefore, GTM cannot see the HTTP traffic between the client and the server and cannot provide session persistence.
Can I use both GTM and CDN for the same domain name?
Yes, you can. You can place CDN in front of GTM. For more information, see Use CDN and GTM together to ensure access security and high service availability.
Can I add a CNAME access domain name from a CDN provider to a GTM address pool?
You can, but it is not recommended. CDN services have many points of presence, while GTM has a limited number of health check nodes. This discrepancy can lead to inaccurate monitoring and switching, which affects the effectiveness of health checks and failover.
DNS resolution fails and returns an old IP address or NXDOMAIN
It takes time for GTM DNS records to propagate. If a record does not take effect after a long time, check the following:
Check if the TTL has expired. Run
dig www.example.comto view the TTL countdown.Check the CNAME configuration. Run
dig +trace www.example.com.Purge the local DNS cache. Run
sudo systemctl flush-dns.
Health check fails
If health checks consistently fail but you have confirmed that the service is running, perform the following steps to troubleshoot:
Confirm that your firewall allows traffic from the GTM probe IP address ranges.
Test the health check path. Run
curl -H "Host: domain" http://ip:port/path.Check the server load and response time.
Billing
If an address is used by both a subscription instance and a pay-as-you-go instance, how are health checks billed?
They are billed independently. For the subscription instance, billing is based on the number of probe tasks generated for the address referenced by the access domain name. For the pay-as-you-go instance, billing is based on the number of health checks performed for the address referenced by the access domain name.
Alerts
Why did I not receive an alert notification?
If you do not receive an expected alert notification, perform the following steps to troubleshoot:
Check the alert rule: Confirm that the alert rule is created and enabled.
Check the contact status: On the Alert Contacts page, confirm that the phone number or email address for receiving notifications has been verified.
Check for spam: Check your spam folder or text message blocklist to see if the notification was misidentified.
Check health check logs: Confirm that the status of the alert object (an address or address pool) has changed in a way that matches the alert rule.
What are the trigger conditions for an alert rule?
Alert rules are mainly based on changes in health check status. Common triggering events include the following:
Address unavailable: Triggered when the number of consecutive health check failures for an address reaches the threshold.
Address becomes available: Triggered when an unavailable address returns to normal.
Address pool unavailable: Triggered when all addresses in an address pool become unavailable.
Address pool becomes available: Triggered when at least one address in an unavailable address pool returns to normal.