What is Global Traffic Manager?

更新时间:
复制 MD 格式

Global Traffic Manager (GTM) enables nearest-access routing, load balancing, health monitoring, and automatic failover for application services.

Prerequisites

Before you read this topic, you should understand the following concepts:

Product overview

Global Traffic Manager (GTM) routes user requests to the nearest available endpoint, balances high-concurrency loads, and monitors endpoint health. GTM automatically isolates faults and switches traffic, enabling active-active and disaster recovery architectures.Global Traffic Manager

Features

Feature

Description

References

Address pool configuration

An address pool groups endpoints (IP addresses or domain names) that share the same carrier or region attributes. Configure multiple address pools per GTM instance so users in different regions access the nearest pool. If a pool becomes unavailable, GTM switches traffic to a backup pool.

Address pool configuration

Access policy

An access policy controls how GTM routes traffic from different networks or regions, enabling nearest access and failover. GTM supports two mutually exclusive access policy types per instance:

  1. Geography-based access policy: routes requests based on user location to enable nearest-node access.

  2. Latency-based access policy: probes latency from the user to each endpoint region and routes requests to the lowest-latency cluster.

Access policies

Health check

Health checks monitor IP address availability in an address pool in real time. Supported methods: ping, TCP, and HTTP(S).

Health checks

Failover

When health checks detect that the primary address pool collection is unavailable, GTM automatically switches traffic to the backup collection, reducing service interruption risk.

GTM failover works as follows:

  1. Address-level: within a pool, healthy IPs are returned to users and unhealthy IPs are temporarily removed.

    Prerequisite: Set the address pool mode to Smart Return.

  2. Pool-level: configure primary and backup address pool collections. If the primary collection fails, the backup takes over.

    Prerequisite: Set the failover policy to Automatic Switchover in the access policy.

  3. Threshold-level: set a minimum healthy IP count for a pool collection. If healthy IPs drop below this threshold, GTM treats the collection as unavailable and switches traffic to the backup.

-

Scenarios

Application service primary-backup disaster recovery

An application service has two IPs: 1.1.XX.XX (primary) and 2.2.XX.XX (backup). Normally, users access 1.1.XX.XX. If 1.1.XX.XX fails, traffic switches to 2.2.XX.XX.

Create two GTM address pools (Pool A with 1.1.XX.XX, Pool B with 2.2.XX.XX) and enable health checks. Set Pool A as primary and Pool B as backup in the access policy to enable automatic failover.

Multiple active IPs for an application service

An application service has three IPs: 1.1.XX.XX, 2.2.XX.XX, and 3.3.XX.XX. All three serve users simultaneously. DNS returns all healthy IPs. If one fails, it is temporarily removed from the DNS record list and restored after recovery.

Create a GTM address pool (Pool A) containing 1.1.XX.XX, 2.2.XX.XX, and 3.3.XX.XX. Set Pool A as the primary collection and enable health checks to implement active-active IP management.

Load balancing for high-concurrency application services

During peak events such as Double 11, services scale out temporarily to handle traffic spikes. Multiple Server Load Balancer (SLB) instances in the same region offload traffic across different IP addresses.

Set the load balancing policy for the address pool in the primary collection to Return All Addresses so each address handles an equal share of traffic. Alternatively, select Return Addresses by Weight and assign different weights to each pool and address for proportional traffic distribution.

Access acceleration for different regions

Large or multinational enterprises deploy service endpoints at core locations across regions so users access the nearest endpoint for the best experience.

GTM provides two access policy types for this scenario:

  • Geography-based: returns addresses from specified pool collections based on user region, enabling nearest-node access.

  • Latency-based: routes users to the application cluster with the lowest latency.

How it works

Assume the website is www.example.com:

  1. After you activate a GTM instance, the system automatically assigns a CNAME endpoint, such as gtm12345678.gtm-000.com.

  2. Add three server IPs (1.1.XX.XX, 2.2.XX.XX, and 3.3.XX.XX) to the GTM instance and enable health checks.

  3. Resolve www.example.com to gtm12345678.gtm-000.com using a CNAME record.

Flowchart

Process

  • An end user sends a DNS query for www.example.com to the local recursive DNS server.

  • If no cache exists, the local recursive DNS server queries the root DNS server, which returns the .com DNS server address.

  • The local recursive DNS server queries the .com DNS server, which returns the authoritative DNS server address for example.com (an Alibaba Cloud DNS server if the domain uses Alibaba Cloud DNS).

  • The local recursive DNS server queries the Alibaba Cloud DNS server, which finds that www.example.com has a CNAME record pointing to gtm12345678.gtm-000.com and returns this CNAME.

  • The local recursive DNS server queries the GTM DNS server for gtm12345678.gtm-000.com. GTM returns the final application endpoint IP based on its configured policies.

  • The local recursive DNS server returns the resolved IP to the end user and caches it for subsequent queries.

  • The end user connects directly to the application service using the resolved IP address.

Service architecture

Architecture diagram

image.png

Description

The following architecture diagram illustrates the GTM components.

  • The DNS module resolves end-user access to primary and backup address pool collections. For example, users in the Chinese mainland access the primary collection while users outside the Chinese mainland access the backup collection. The two collections serve as mutual backups.

  • The health check module probes multiple endpoints in an address pool from multiple regions using ping, TCP, or HTTP(S).

  • If an endpoint in the primary collection fails, the health check module detects it and notifies the DNS module, which temporarily removes the unhealthy address. When the endpoint recovers, the DNS module restores it to the response list.

  • If the primary collection fails, GTM switches Chinese mainland users to the backup collection ("secondaryAddresspoolSet") based on the failover policy. Similarly, if the backup collection fails, GTM switches users outside the Chinese mainland to the primary collection ("primaryAddressPoolSet").

This ensures end users automatically reach the optimal application endpoint for continuous, uninterrupted access.

System architecture

GTM consists of a control layer and a resolution layer:

  • Control layer: provides services through the console and OpenAPI for managing DNS resolution data, configuration, monitoring, and logs. Deployed in the China (Zhangjiakou) region.

  • Resolution layer: a globally deployed cluster of DNS servers that receives records distributed from the control layer and responds to DNS queries. Nodes are deployed across major continents and regions worldwide.

Join us

DingTalk group: 79530043379