All Products
Search
Document Center

Alibaba Cloud DNS:Use GTM to implement ISP line-based resolution and failovers

Last Updated:May 30, 2024

Scenarios

Most application services of enterprises use IP addresses provided by multiple Internet service providers (ISPs). This may cause issues such as cross-network delay, packet loss, and unavailability. Global Traffic Manager (GTM) can detect the ISP of a user and respond DNS requests of this user with IP addresses of application servers that reside on the network of the same ISP of this user. This way, this user can access the nearby application servers, accelerating network access. Moreover, when all the IP addresses provided by an ISP become unreachable, services can be switched to IP addresses provided by other ISPs. This minimizes the failure impact and ensures business continuity.

Prerequisites

  • The domain name cloud-example.com is hosted by Alibaba Cloud DNS. You want to connect the business domain name www.cloud-example.com to GTM.

    Note

    If your business domain name is not hosted by Alibaba Cloud DNS, you can also use GTM. You need to add a canonical name (CNAME) record to DNS settings of the current DNS service provider of the business domain name to map the business domain name to the corresponding access domain name in GTM.

  • A GTM instance, for example, gtm-cn-vkl3pkw**07, is purchased. To purchase an instance, see Purchase an instance.

  • The following intelligent resolution is required.

    Source of DNS requests

    IP address of application service

    IP address after failover

    China Mobile

    1.1.XX.XX

    2.2.XX.XX, 3.3.XX.XX

    China Telecom

    2.2.XX.XX

    1.1.XX.XX, 3.3.XX.XX

    China Unicom

    3.3.XX.XX

    1.1.XX.XX, 2.2.XX.XX

    Global

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

    If health checks determine that all IP addresses are abnormal, the fallback resolution policy is triggered and all IP addresses are returned.

Architecture

image

Procedure

  1. Log on to the Alibaba Cloud DNS console.

  2. In the left-side navigation pane, click Global Traffic Manager. On the page that appears, click the Global Traffic Manager3.0 tab.

  3. On the Domain Name Instance Configuration tab, click Create Access Domain Name.

  4. In the Select Scenario dialog box, select Single Data Center for Multiple ISPs.

  5. On the Create Access Domain Name page, move the pointer over the Access Domain Name icon and click Basic Configuration.

  6. In the Basic Access Domain Name Configuration panel, configure the parameters and click Submit Configuration. For more information about how to configure an access domain name, see Configure an access domain name. image

  7. On the Access Domain Name page, move the pointer over an Address Pool icon and click Basic Configuration. In the Basic Address Pool Configuration panel, configure the parameters and click Submit Configuration. For more information, see Basic configuration parameters in the Configure an address pool topic. Configure four address pools named Mobile, Telecom, Unicom, and Global.

    image

  8. On the Access Domain Name page, move the pointer over an Address Pool icon and click Add Address. Add addresses to the three address pools according to your plan. In the Add Address panel, set the parameters and reference one or more health check template. In this example, TCP and port 80 are selected.

    Note

    If no health check template is created, click Quickly Add Detection Template to add one. For more information, see Health check templates.

    image

    Important

    The preceding example demonstrates the configuration procedure. If red or orange alert items appear in the actual configuration, check the address health status at the earliest opportunity.

  9. Usually, you do not need to configure load balancing policies because the scenario-specific template automatically generates policies.

    Important
    • If you want to schedule the addresses configured for the global default line based on a policy such as weight or sequence, you can adjust settings based on your business requirements. For more information, see Parameters for configuring the policies of load balancing between addresses in the Configure an address pool topic.

    • If the address pools configured for an intelligent line are unavailable, the addresses configured for the global default line are returned.

    • If health checks determine that all address pools are unavailable, the addresses in the global default address pool are returned based on a round-robin basis. If the default line is configured with multiple address pools, addresses in a non-empty address pool with the smallest sequence number are returned. If no global default line is configured, addresses in a non-empty address pool with the smallest sequence number are returned.

  10. Configure alert settings for the instance. For more information, see Procedure in the Configure alert settings topic.

  11. On the Access Domain Name page, move the pointer over the Access Domain Name icon and click Enable. image

  12. In the Confirm Access Domain Name Enabling dialog box, confirm that the configuration of the access domain name is correct and click OK.

    Important
    • If a domain name record with the same name and the same type exists in the Authoritative DNS Resolution module of Alibaba Cloud DNS, the system first intelligently schedules and resolves DNS requests for this domain name based on the policy configured in GTM to implement advanced features such as traffic load balancing and failovers.

    • If you disable or delete this access domain name in GTM, requests for this domain name will be resolved by the Authoritative DNS Resolution module of Alibaba Cloud DNS.