All Products
Search
Document Center

Alibaba Cloud DNS:Use GTM to implement zone-disaster recovery

Last Updated:Oct 18, 2024

Overview

Solution description

If a service is deployed in multiple data centers of the same region and one of the data centers is down, you can use Global Traffic Manager (GTM) to switch traffic to another data center in the same region. This ensures business stability and continuity.

This topic describes how to build a zone-disaster recovery architecture where two data centers are deployed in the same region. In such an architecture, two data centers independently run critical business and have equal business processing capabilities. Data is synchronized between the data centers in real time over high-speed connections. In normal cases, the data centers run business and management systems at the same time and a switchover can be performed between two data centers. When a data center is down, a failover is triggered with most data kept to ensure business continuity. To reduce costs and ensure high service availability, most enterprises prefer to deploy two data centers in the same region.

Intended audience

This topic is intended for personnel who are responsible for network or business O&M.

Scenarios

The zone-disaster recovery feature is applied when a service is deployed in multiple data centers in the same region.

Terms

Term

Description

GTM

GTM supports intelligent Domain Name System (DNS) resolution, health check, fault isolation, and failover. GTM can help enterprises quickly establish a disaster recovery architecture where two data centers are deployed in the same region or three data centers are deployed across two regions.

intelligent DNS resolution

GTM allows a visitor to access the nearest server by returning the IP address of the server based on the DNS request source of the visitor, such as an Internet service provider (ISP) or a specific region.

health check

GTM performs Layer 3 to Layer 7 health checks on servers to identify exceptions in a timely manner.

primary and secondary address pools

Primary and secondary address pools are configured to achieve fault isolation and failover among different data centers.

Solution architecture

Solution architecture diagram

同城容灾

Benefits

  • The zone-disaster recovery architecture offers low investment, quick construction, simple O&M, and high reliability.

  • If a data center is down, its business can be quickly switched to the other data center that runs as expected. This enables enterprises to easily handle faults that occur in a single data center.

  • If the two data centers run as expected, traffic can be flexibly scheduled. A/B testing and canary release are supported.

Solution implementation

Prerequisites

  • A GTM instance is created. You can click here to purchase one.

    Note

    To identify a fault and perform a failover, a GTM instance of Ultimate Edition requires about 1 minute and a GTM instance of Standard Edition requires about 3 minutes. If you require high service availability, we recommend that you purchase a GTM instance of Ultimate Edition.

  • The following two IP addresses are prepared: 192.0.2.0 in Zone A of the China (Beijing) region and 192.0.2.1 in Zone B of the China (Beijing) region.

Procedure

  1. Log on to the Alibaba Cloud DNS console and click Global Traffic Manager in the left-side navigation pane. On the page that appears, find the desired instance and click Settings in the Actions column.

    image

  2. Click Advanced Settings. On the page that appears, click the Basic Settings tab and click Modify. In the Modify Basic Settings panel, specify the parameters as instructed based on your business requirements. We recommend that you set the Global TTL Period parameter to 10 Minutes.

    image..png

  3. On the Address Pools tab, click Create Address Pool and configure address pools as instructed. Create two address pools. Name one of the address pools Business Center 01 and add the IP address 192.0.2.0 for it. Name the other address pool Business Center 02 and add the IP address 192.0.2.1 for it. Click the + icon before the desired address pools to enable the health check feature on the Address Pools tab. Configure the health check feature as instructed based on your business requirements.

    image..png

  4. On the Basic Settings tab, click Settings in the Geographical Location-based Access Policy section and click Create Access Policy. Set the DNS Request Source parameter to Global > Global, select Business Center 01 and Business Center 02 for the Address Pool parameter, and then select Return All Addresses for the Load Balancing Policy(Address Pool) parameter. This ensures that two data centers provide services at the same time and the system automatically removes abnormal addresses from the primary address pool set.

    访问策略

  5. Copy the canonical name (CNAME) on the Basic Settings tab. Go to the DNS Settings page of the service domain name, and click Add DNS Record. Add a CNAME record for the domain name to point the domain name to the CNAME provided by GTM. This way, the traffic from the clients of visitors can be switched.

    image..png

    image..png

FAQ

  1. How long does it take to complete a failover? Assume that the health check interval is set to 15 seconds, the global time-to-live (TTL) period is set to 10 seconds, and the number of consecutive failures is set to 3. GTM can identify a failure and perform a failover within about 1 minute. Theoretically, the failover takes effect across the network within about 10 seconds. The actual failover period depends on the caching time that is specified by ISPs.

  2. Can I use GTM if I do not use Alibaba Cloud DNS? Yes, GTM can provide a CNAME to allow you to create a CNAME record for your domain name on the management platform of your DNS service provider.