All Products
Search
Document Center

Implement batch traffic switchover in multi-application scenarios

Last Updated: Mar 26, 2021

What is a disaster recovery plan?

You can create a disaster recovery plan in Global Traffic Manager (GTM) to test disaster recovery capabilities and switch traffic when failures occur.

Scenarios

  • When you test disaster recovery capabilities, you can create a disaster recovery plan to simulate server failures and verify that the switchover policy meets your requirements.

  • You can create a disaster recovery plan to switch traffic of multiple applications to other address pools in batches.

  • You can create a disaster recovery plan for Internet service provider (ISP)-level faults. When a fault occurs, you can run the plan to switch the access traffic to another ISP.

  • You can create a region-level disaster recovery plan. When a fault occurs, you can run the plan to switch the access traffic to another region.

Implement batch traffic switchover in multi-application scenarios

We expect to switch the traffic of resolution requests from three applications to the data center in Qingdao by using the disaster recovery feature.

Resource preparation

  • Three GTM instances (application 1, application 2, and application 3)
  • Domain names (dns-example.com, www.dns-example.com, and api.dns-example.com) of the three applications
  • Addresses used by the applications

Perform the following configurations after you prepare the preceding resources:

(1) Perform GTM configuration

  • Create instances
  • Configure access policies
  • Configure address pools
  • Enable health check
  • Configure global settings
  • Implement CNAME access

(2) Configure disaster recovery plans

  • Create disaster recovery plans
  • Perform traffic switchover
  • Verify switchover results

Configuration method

Log on to the Alibaba Cloud DNS console. In the left-side navigation pane, click Global Traffic Manager. The Global Traffic Manager page appears.

Perform GTM configuration

1. Create instances

Purchase three GTM instances. For more information, see Create an instance.

2. Configure access policies

Assume that the GTM instances are named three applications: official website, payment system, and API system. Configure the following access policies. For more information, see Access policy. Note: You must create address pools before you set Default Address Pool and Alternative Address Pool in the Edit Access Policy dialog box. For more information, see Create an address pool.

  • Configuration results of the access policy for the official website (application 01)

    1
  • Configuration result of the access policy for the payment system (application 02)

    2
  • Configuration result of the access policy for the API system (application 03)

    3

3. Configure address pools

Address pools allow GTM to manage IP addresses of applications. For more information about how to create an address pool, see Create an address pool. In this example, we expect to switch the traffic of resolution requests from the three applications to the data center in Qingdao by using the disaster recovery feature.

  • Address pool configuration result of the official website (application 01)
1
  • Address pool configuration result of the payment system (application 02)
2
  • Address pool configuration result of the API system (application 03)
3

4. Enable health check

After you turn on Health Check, you can configure health check for the IP addresses in the address pool to monitor the availability of applications in real time, helping enterprises implement automatic fault isolation and switchover. For more information, see Enable health check. 5. Configure global settings

Global settings refer to the global system configurations of the created GTM instance, including Primary Domain, Balance Policy, Global TTL, and Alert Group. For more information, see Global settings.

  • Global setting result of the official website (application 01)
1111
  • Global setting result of the payment system (application 02)
222222
  • Global setting result of the API system (application 03)

    123

6. Implement CNAME access

For more information, see CNAME access. Go to the DNS Settings page of a domain name and map the CNAME records of three subdomains to the canonical domain names provided by GTM. If Alibaba Cloud DNS is used for the domain names, the configuration on the Alibaba Cloud DNS console is shown in the following figure.

123