All Products
Search
Document Center

Alibaba Cloud DNS:Use GTM to implement carrier-based DNS resolution and failover

Last Updated:Jun 22, 2026

Configure Global Traffic Manager (GTM) to route DNS queries to the application server on the same carrier network as the user, and automatically fail over to a healthy server when an endpoint becomes unavailable.

Scenarios

Most enterprise applications use IP addresses from multiple carriers, which can cause cross-network latency, packet loss, and service unavailability. Global Traffic Manager (GTM) returns the IP address of an application server on the same carrier network as the requesting user, enabling nearest-server access and faster connections. When a server on one carrier network fails, GTM switches traffic to a server on another carrier network, minimizing downtime and ensuring service continuity.

Prerequisites

  • The Access Domain relies on a domain name within an Public Zone. Ensure that at least one domain name in the Public Zone has a DNS Server IP Address with a Available status.

    Note

    If your service domain name does not use Alibaba Cloud DNS, you can still use GTM. After you generate an access domain name using a different domain name, add a CNAME record for the service domain name at your DNS provider and point the record to the GTM Access Domain.

  • If you use the subscription billing method, you must purchase a subscription instance in advance.

Solution overview

This solution provides the following intelligent DNS resolution:

Source of DNS resolution request

Address Pool

Application server endpoint

Failover address

Shift

Mobile

1.1.XX.XX

2.2.XX.XX, 3.3.XX.XX

China Telecom

Telecom

2.2.XX.XX

1.1.XX.XX, 3.3.XX.XX

China Unicom

Unicom

3.3.XX.XX

1.1.XX.XX, 2.2.XX.XX

Global Default

Global

1.1.XX.XX, 2.2.XX.XX, 3.3.XX.XX

If all addresses become unhealthy, a fallback policy is triggered to return all IP addresses.

Architecture

image

Procedure

1. Configure Access Domain

  1. Go to Alibaba Cloud DNS - Global Traffic Manager.

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

  3. In the dialog box, select Single Data Center for Multiple ISPs.

  4. Click the Access Domain icon > Basic Configuration.

    image

  5. Complete the basic information and keep Enabed State set to Disabled. For more information, see Add Domain Name Configuration.

    image

2. Configure address pools and addresses

  1. On the Access Domain page, click the address pool icon > Basic Configuration.

    image

  2. Name the four address pools Mobile, Telecom, Unicom, and Global. For more information, see Address Pool Configuration.

    image

  3. Click the address icon > Basic Configuration and add 1.1.XX.XX for Mobile, 2.2.XX.XX for Telecom, and 3.3.X.X for Unicom.

    image

  4. Click Global address pool > Select Address to add the three addresses that you previously created.

    image

3. Configure load balancing policies

  1. Because you selected a preset scenario, the Load Balancing Policy is already set to Nearest Source. If this is not the case, you can click the load balancing policy under Access Domain to configure it.

    image

  2. Because you selected a preset scenario, the Load Balancing Policy is selected by default. If this policy is not set, you can click Query Source above the address pool to complete the Query Source.

    image

    image

  3. The complete configuration:

    image

4. Enable Access Domain and ingest the stream

  1. Click the Access Domain icon, and then click Enable for the Access Domain.

    image

    Important
    • If a domain name record with the same name and type exists in the Public Zone, the system first uses the Global Traffic Manager (GTM) policy to intelligently schedule and resolve queries, enabling advanced features such as traffic load balancing or failover.

    • If you disable or delete a Access Domain, it will be resolved by the Public Zone.

  2. You can use the Network Probe Tool to enter the Access Domain and verify that the network probe results from different carriers follow the Nearest Source principle.

    image

    GTM uses the Nearest Source policy to return IP addresses.

  3. After you verify the configuration of the Access Domain, go to the DNS provider for your business domain name and add a CNAME record that points to the Service Domain Name.

5. Verify failover

Scenario 1: The service address for the China Mobile line is abnormal

image

Probe results:

image

Because the China Mobile endpoint is unhealthy, resolution switches to the first available IP address on the default line: telecom (2.2.XX.XX). The failover succeeds, and other lines continue using the Nearest Source policy.

Scenario 2: The service addresses for both the China Mobile and China Telecom lines are abnormal

image

Probe results:

image

Because the China Mobile and China Telecom endpoints are unhealthy, GTM routes all traffic to the first available IP address on the default line: unicom (3.3.XX.XX). The failover succeeds using the Nearest Source policy.