All Products
Search
Document Center

Alibaba Cloud DNS:Primary/standby disaster recovery with GTM

Last Updated:Jun 02, 2026

Use cases

If your application runs in two data centers, each with a public IP address, you can use Global Traffic Manager (GTM) to route all traffic to the primary data center and automatically fail over to the standby when the primary becomes unavailable.

Prerequisites

  • Your domain cloud-example.com is hosted on Alibaba Cloud DNS. The subdomain managed by GTM is www.cloud-example.com.

    Note

    If your domain uses a third-party DNS provider, add a CNAME record pointing to the GTM access zone name in that provider's console.

  • A GTM instance is available. If not, purchase a subscription instance.

  • Target traffic scheduling result:

    Source of DNS queries

    Primary endpoint

    Failover endpoint

    Global default

    1.1.XX.XX

    2.2.XX.XX

Procedure

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

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

  3. In the Select Scenario dialog box, select Primary/Secondary Disaster Recovery.

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

    image

  5. On the Basic Configuration page, set the required parameters and click Submit. Configure an access zone name.

  6. On the current page, click the address pool icon and select Basic Configuration.image

  7. On the Access Domain page, click the address icon and select Basic Configuration. Add the endpoint IP address, configure a health check template (for this example, TCP protocol, port 80), and create the address. Repeat for all required addresses.

    Note

    If no health check template exists, click Add Health Check Template. Health check templates.

    Important

    If you encounter red or orange alerts during setup, check the health status of your addresses.

  8. The scenario template generates a load balancing policy. Manual configuration is typically not needed.

    Important

    With one-way data synchronization (from primary to standby), data generated on the standby during a failover cannot be returned to the primary. To prevent data loss upon recovery, set the address pool's load balancing policy to Non-Preemptive Mode. Configure an address pool.

  9. Configure alert rules for the instance. Configure alerts.

  10. On the Access Domain page, click the access zone name icon and select Enable.image

  11. In the confirmation dialog box, verify the details and click OK to enable the Access Domain.

    Important
    • If a DNS record with the same name and type already exists in Alibaba Cloud DNS, GTM policies take precedence over standard DNS resolution for that domain.

    • If the GTM instance is disabled or deleted, DNS queries fall back to Alibaba Cloud DNS Public Zone records.