All Products
Search
Document Center

Alibaba Cloud DNS:Get started with Global Traffic Manager 3.0

Last Updated:Feb 28, 2026

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.

Solution architecture diagram

GTM processes traffic in four stages:

  1. Health check -- GTM continuously monitors the service addresses in the Primary-DC and Backup-DC address pools.

  2. DNS query -- A user initiates a request. The local DNS sends a query for the service domain name to GTM.

  3. 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.

  4. 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 at 139.3.*.*)

Step 1: Create an access domain

  1. Go to the Global Traffic Manager console.

  2. On the Access Domain tab, click Create Access Domain.

  3. In the dialog box, select Custom Scenario.

  4. On the Access Domain configuration page, click the access domain name icon and select Basic Configuration.

    Access domain basic configuration

  5. Configure the following settings.

    SettingValue
    Access DomainEnter 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 MethodSelect Pay-as-you-go.
    Record TypeSelect 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 StateKeep the default disabled status. Enable it after all configurations are complete.
    RemarksEnter a description.

    Access domain settings form

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.

  1. Click the Access Domain icon, and then click Add Address Pool.

    Add address pool entry point

  2. Configure the following settings. For details, see Address pool configuration.

    SettingValue
    Address Pool NamePrimary-DC
    TypeIPv4
    Health Status ConditionsSelect At least one address in the address pool is available. The pool is considered healthy if at least one address passes health checks.
    Enabed StateEnable

    Primary address pool settings

  3. Repeat these steps to create a backup address pool named Backup-DC.

Step 3: Add service addresses

  1. Click the icon for the address pool you created, and then click Add Address.

    Add address entry point

  2. Configure the following settings. For details, see Address configuration.

    SettingValue
    Address NamePrimary-Server-01
    TypeIPv4
    TypeEnter the public IP address of the server in the primary data center.
    Health CheckEnable. 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.

    Address settings form

  3. Repeat these steps to add a service address to the Backup-DC address pool. The result looks like the following figure.

    Completed address pool configuration

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

  1. Click the policy above the address pools and select Load Balancing Policy.

    Load balancing policy entry point

  2. Configure the following settings.

    SettingValue
    Load Balancing PolicyGlobal Availability
    Preemptive ModePreemptive Mode

    Load balancing policy settings

  3. Click Sequence No. > Adjust Sequence Number.

    Adjust sequence number entry point

  4. 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.

Within-pool load balancing 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.

  1. Verify that all health checks are passing. If any red or orange alert indicators appear, troubleshoot the address health checks before proceeding. Healthy status indicators Health check details

  2. Click the access domain name icon and select Enable.

    Enable access domain

  3. In the confirmation dialog box, review the settings and submit the configuration.

  4. 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.com

Expected 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.com

Expected 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.

Note

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.

  1. Go to the Alibaba Cloud DNS - Public DNS console. Find the target domain name and click Settings.

  2. Click Add Record and configure the following settings.

    SettingValue
    Record TypeCNAME
    HostEnter the host record for traffic steering.
    ValueEnter the configured access domain name.

    CNAME record configuration

Important

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:

  1. Create the CNAME record in a disabled state. Create CNAME in disabled state

  2. During off-peak hours, disable the existing A or AAAA records.

  3. Enable the CNAME record.

Billing

For pricing details, see Product Billing.

References