All Products
Search
Document Center

Global Traffic Manager:Configure multiple sites for an application service

Last Updated:Nov 09, 2023

To ensure that users from different countries or regions have a good access experience, enterprises tend to deploy at least two sites for each application service separately in and outside the Chinese mainland and one site at the backend. These enterprises can use Alibaba Cloud DNS to intelligently forward requests from users in different regions to different sites. The sites back up data of each other to implement failover. This ensures the high availability of the application service.

Principles

image.png

Procedure

Configure address pools

In this example, four address pools are configured. The two address pools in North China and South China back up each other. The two address pools in the China (Hong Kong) and Singapore regions back up each other.

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, find the desired GTM instance and click Settings in the Actions column.

  3. On the Basic Settings page, click the Address Pools tab, and click Create Address Pool. In the Create Address Pool dialog box, specify the parameters including Address Pool Name, Address Pool Type, Load Balancing Policy(Address), Address, and Mode, and click OK. Repeat the preceding steps to create another three address pools.

image.png

Enable the health check feature

Procedure

  1. On the Address Pools tab, click the + icon before the desired address pool name, and click Add next to Health Check.

  2. Configure the health check feature, for example, TCP health check. If the IP addresses added to the address pool belong to a region outside the Chinese mainland, select the options in the Overseas Nodes section for Monitored Nodes. Enable the health check feature for the four address pools.

Configure access policies

You can configure access policies to forward requests from different users to different address pools. To ensure the high availability of your application service, you can configure a primary address pool set and a secondary address pool set. If the primary address pool set fails, requests can be forwarded to the secondary address pool set.

Procedure

  1. On the Basic Settings tab, find Geographical Location-based Access Policy in the Access Policy Type section and click Settings.

  2. On the Geographical Location-based Access Policy page, click Create Access Policy and specify the parameters described in the following section.

  • Access Policy 1: Select Global for the DNS Request Source parameter, North China for the Primary Address Pool Set parameter, and South China for the Secondary Address Pool Set parameter. In this way, all Domain Name System (DNS) requests are forwarded to the North China address pool when no other DNS request source is matched, and requests are forwarded to the South China address pool when the North China address pool fails.

  • Access Policy 2: Select South China for the DNS Request Source parameter, South China for the Primary Address Pool Set parameter, and North China for the Secondary Address Pool Set parameter. In this way, requests from users in South China are forwarded to the South China address pool, and requests are forwarded to the North China address pool when the South China address pool fails.

  • Access Policy 3: Select Outside Mainland China for the DNS Request Source parameter, China (Hong Kong) for the Primary Address Pool Set parameter, and Singapore for the Secondary Address Pool Set parameter. In this way, requests from users in the regions outside the Chinese mainland except for Singapore are forwarded to the China (Hong Kong) address pool, and requests are forwarded to the Singapore address pool when the China (Hong Kong) address pool fails.

  • Access Policy 4: Select Singapore for the DNS Request Source parameter, Singapore for the Primary Address Pool Set parameter, and China (Hong Kong) for the Secondary Address Pool Set parameter. In this way, quests from users in Singapore are forwarded to the Singapore address pool, and requests are forwarded to the China (Hong Kong) address pool when the Singapore address pool fails.

    image.png

Modify the basic settings of the GTM instance

Procedure

  1. On the Basic Settings tab, click Modify. In the Modify Basic Settings panel, modify the basic settings. For more information, see Basic settings.

    image.png

Add a CNAME record

Procedure

  1. On the Basic Settings tab, copy the value of the CNAME(Internet) parameter provided by GTM.

  1. Click Domain Name Resolution in the left-side navigation pane. On the page that appears, add a canonical name (CNAME) record for your service domain name to point the domain name to the CNAME provided by GTM. In this way, your service application is connected to GTM.