All Products
Search
Document Center

Implement regional intelligent resolution by using GTM

Last Updated: Sep 11, 2020

Scenarios

In most cases, enterprises deploy their applications on multiple servers, whose IP addresses may come from data centers of different countries, regions, ISPs, or service providers. You can use intelligent resolution of Alibaba Cloud DNS to route visitors to the nearest application servers to accelerate access. However, a Domain Name System (DNS) server cannot detect the availability of application servers. When an application server becomes faulty upon disasters, the DNS server may still return the IP address of the faulty server to visitors. As a result, the visitors fail to access the application.

Solutions

  • Configure the intelligent resolution feature of Alibaba Cloud DNS to route visitors to the nearest application servers to accelerate access.
  • Configure the health check feature of Global Traffic Manager (GTM) to implement switchover and redundancy.

This topic describes how to configure intelligent resolution and switchover by using Alibaba Cloud DNS and GTM.

Scenarios

Deployed application servers

  • Beijing: 1.1.1.1 and 2.2.2.2
  • Shanghai: 3.3.3.3 and 4.4.4.4
  • Japan: 10.10.10.10 and 12.12.12.12
  • Germany: 13.13.13.13 and 14.14.14.14
  • Singapore: 7.7.7.7 and 8.8.8.8

Intelligent resolution

  • Visitors from China are routed to the servers in Beijing (1.1.1.1 and 2.2.2.2).
  • Visitors from Japan are routed to the servers in Japan (10.10.10.10 and 12.12.12.12).
  • Visitors from Europe are routed to the servers in Germany (13.13.13.13 and 14.14.14.14)

Switchover

  • Failover between servers in Beijing and Shanghai
  • Failover between servers in Japan and Singapore
  • Failover between servers in Germany and Singapore

For example, if the application servers in Beijing are faulty, access traffic to Beijing is forwarded to Shanghai. This ensures business continuity.

Prepare resources

Prepare a domain name

This topic uses the domain name api.dns-example.com as an example.

Purchase Alibaba Cloud DNS

  • In the configuration, fine-grained intelligent resolution is used. You must purchase the Enterprise Standard or Enterprise Ultimate edition of Alibaba Cloud DNS. For more information about ISP lines supported by the Enterprise Standard edition, see Supported lines.

  • One instance of the Enterprise Standard edition is required.

If you have no Alibaba Cloud DNS instance of the Enterprise Standard edition under your account, click Buy Now.

Configure GTM

For example, you provide the same subdomain to users from different regions. You can determine how many GTM instances to be purchased based on the number of intelligent resolution records. This example specifies that different IP addresses are returned to visitors from China, Japan, and Europe. This requires three DNS records. Therefore, you must purchase three GTM instances.

If you have no GTM instance under your account, click Buy Now.

Configuration method

Global Traffic Manager

1. Log on to the Alibaba Cloud DNS console. The Manage DNS page appears.

2. On the Global Traffic Manager page, create instances and configure the primary domain name.

  • In the left-side navigation pane, click Global Traffic Manager. On the Global Traffic Manager page, click Configure in the Actions column.

    1

  • On the Global Settings tab, configure the instance names, such as test (China), test (Japan), and test (Europe). Set the primary domain names of all the three instances to api.dns-example.com.

112

3. Configure the test (China) instance.

  • On the Address Pool Configurations tab, click Create Address Pool to create address pools for Beijing and Shanghai.

12

  • GTM implements switchover based on health checks. You must turn on

    Health Check and add a new health check or click Edit to modify an existing health check. For more information about health check configuration, see HTTP(S) health check.

12

12

  • On the Access Policy tab, click Add Access Policy. Set Default Address Pool to Beijing and Alternative Address Pool to Shanghai.

  • Set DNS Request Sources to Global. GTM only supports part of the resolution lines. You can set DNS Request Sources to Global and configure fine-grained intelligent DNS resolution on the Manage DNS page.

123

4. Configure the test (Japan) instance.

  • On the Address Pool Configurations tab, click Create Address Pool to create address pools for Japan and Singapore and turn on Health Check.

1231

  • On the Access Policy tab, click Add Access Policy. Set Default Address Pool to Japan and Alternative Address Pool to Singapore.

  • Set DNS Request Sources to Global. GTM only supports part of the resolution lines. You can set DNS Request Sources to Global and configure fine-grained intelligent DNS resolution on the Manage DNS page.

123

5. Configure the test (Europe) instance.

  • On the Address Pool Configurations tab, click Create Address Pool to create address pools for Germany and Singapore and turn on Health Check.

33333

  • On the Access Policy tab, click Add Access Policy. Set Default Address Pool to Germany and Alternative Address Pool to Singapore.

  • Set DNS Request Sources to Global. GTM only supports part of the resolution lines. You can set DNS Request Sources to Global and configure fine-grained intelligent DNS resolution on the Manage DNS page.

333111

6. On the Global Settings tab, click Click to Copy next to CNAME Access Domain Name for the test (China), test (Japan), and test (Europe) instances.

3331112

Configure DNS records

1. On the Manage DNS page, find the domain name dns-example.com, and click Configure in the Actions column.

111222

2. Click Add Record. In the Add Record dialog box, set the values of the records to the CNAME Access Domain Name values of the test (China), test (Japan), and test (Europe) instances.

  • Set Type to CNAME.

  • Set Host to api because the subdomain name used in the example is api.dns-example.com.

  • Set ISP Line and Value, as shown in the following figures.

1123122331441221

Verification

Go to Test Tools Now

Switchover

You can verify the switchover configuration by using the disaster recovery plan feature. For more information, see Disaster recovery plans.