Intra-city disaster recovery with Global Traffic Manager

Updated at:

Overview

Introduction

Intra-city disaster recovery involves deploying application services across multiple data centers within a single region. In the event of an outage in one data center, Global Traffic Manager (GTM) ensures your business operates 24/7. This strategy maintains business continuity and provides an uninterrupted user experience, even during a partial failure.

An active-active architecture establishes two data centers in the same city, both capable of independently running critical systems with nearly identical processing power. High-speed links synchronize data in real time. In a disaster, GTM reroutes traffic with minimal data loss to maintain continuous service. Many enterprises choose this deployment to balance cost and high availability.

Target audience

Network engineers and operations and maintenance (O&M) staff.

Use cases

Disaster recovery for application services deployed across multiple data centers within a single region.

Key concepts

Term

Definition

GTM

Global Traffic Manager (GTM) is a service that provides intelligent resolution, health checks, fault isolation, and failover. It helps you build highly available disaster recovery architectures, such as active-active intra-city or multi-region deployments.

intelligent resolution

Resolves DNS queries by directing users to the nearest application server based on the user's location or network source, such as their ISP or region. This reduces latency and improves performance.

health check

Monitors servers from Layer 3 to Layer 7 to quickly detect application issues or endpoint failures.

Primary and standby address pools

GTM allows you to configure primary and standby address pools. You can group service addresses from different data centers to enable data center-level fault isolation and failover.

Solution architecture

Architecture diagram

同城容灾

Benefits

  • GTM offers a cost-effective, fast, and reliable way to build an intra-city disaster recovery architecture.

  • In an active-active intra-city setup, GTM can automatically reroute traffic to the healthy data center if one center fails. This ensures your business is resilient to a single data center outage.

  • With two active and online data centers, GTM flexibly distributes traffic between them, enabling practices such as A/B testing and canary releases.

Implementation

Prerequisites

  • Create a GTM instance. For more information, see Global Traffic Manager.

    Note

    The Ultimate Edition detects failures and completes a failover in about one minute. The Standard Edition takes about three minutes. If you require high availability, we recommend that you choose the Ultimate Edition.

  • Prepare your resources. For this example, we use two IP addresses in the China (Beijing) region: one in availability zone A (192.0.2.0) and another in availability zone B (192.0.2.1).

Procedure

  1. Log on to the Alibaba Cloud DNS console and go to the Global Traffic Manager page. In the instance list, find your target instance and click Actions in the Configure column.

  2. On the Basic Configuration tab, click Edit. Configure the settings based on your business needs. We recommend that you set the Global TTL to 10 minutes.

  3. On the Address Pool Configuration tab, click Add Address Pool. Create two address pools. Name the first one Business Center 01 and add the IP address 192.0.2.0. Name the second one Business Center 02 and add the IP address 192.0.2.1. Then, in the address pool list, click the + icon for each pool to add a health check. Configure the health check parameters based on your business requirements.

  4. Return to the Basic Configuration tab. For the policy type, select Geographic Location-based Access Policy and click Configure. Then, click Add Access Policy. Create a global access policy with the following settings: for Resolution Request Traffic Source, select Global. For the Primary Address Pool Set, select both the Business Center 01 and Business Center 02 address pools. For the Load Balancing Policy, select Return All Addresses. This configuration allows both data centers to serve traffic simultaneously and ensures that GTM automatically removes a faulty IP address from DNS responses in the event of a failure.

  5. Route production traffic to GTM.

    1. Navigate to the Alibaba Cloud DNS - Hosted Public Zone console. In the domain list, find your domain name and click Settings.

    2. Click Add DNS Record. Create a CNAME record that points your service hostname to the CNAME access domain provided by GTM. After you add the record, GTM manages your application traffic.

    On the instance details page of Global Traffic Manager, you can view the CNAME Access Domain (Public), which is the value required for the CNAME record. You can also find other instance configuration details, such as the Instance ID, Service Domain (Public), Global TTL, Instance Name, Alert Notification Group, Instance Edition, Creation Time, and Expiration Time.

Verification

Active-active setup verification

Use the dig command to query your domain name. The DNS response should return both IP addresses, confirming that traffic is distributed to both data centers as expected.

Failover mechanism verification

  1. Simulate an outage by stopping the service or disconnecting the network for the IP address 192.0.2.0 in the Business Center 01 address pool.

  2. In the GTM access policy, check that the number of available addresses changes from "2" to "1".

  1. Use the dig command again to query your domain. The DNS response should now return only the IP address 192.0.2.1 from Business Center 02. This confirms that GTM has automatically removed the faulty IP address 192.0.2.0.

FAQ

  1. How long does a failover take? With a health check interval of 15 seconds, a TTL of 10 seconds, and a consecutive failure threshold of 3, GTM can detect a failure and initiate a failover in approximately one minute. After the failover, the DNS change should propagate across the internet in about 10 seconds. However, the actual time depends on the caching policies of various ISP DNS resolvers.

  2. Can I use Global Traffic Manager if my domain is not hosted on Alibaba Cloud DNS? Yes. GTM provides a CNAME access domain that you can use to route traffic. In your current DNS provider's management console, create a CNAME record for your service hostname and point it to the GTM CNAME access domain.