All Products
Search
Document Center

Server Load Balancer:Use GTM and CLB instances to implement cross-region load balancing

Last Updated:Sep 24, 2026

When you need cross-region load balancing, such as cross-region high availability (HA) or disaster recovery and backup, use Classic Load Balancer (CLB), a Server Load Balancer (SLB) offering, with Global Traffic Manager (GTM). If a service in one region fails, GTM detects the failure through health checks and routes traffic to a healthy service in another region to help ensure service continuity.

Introduction to Global Traffic Manager

Global Traffic Manager (GTM) is a global traffic management and load balancing service that operates at the DNS layer. GTM performs health checks on the address pool of each region. If a service in one region fails, GTM routes traffic to a healthy service in another region.

GTM supports active-active architectures within a city and geo-disaster recovery across regions. GTM can manage IP addresses from both Alibaba Cloud and non-Alibaba Cloud providers, which enables hybrid cloud deployments.

For more information about GTM, see What is Global Traffic Manager?.

Scenario example

An enterprise uses CLB with Elastic Compute Service (ECS) instances to distribute and load-balance service traffic. The enterprise requires cross-region disaster recovery and backup in the China (Hangzhou) and China (Beijing) regions. If a service in one region becomes unavailable, traffic must switch over automatically to the healthy backend services in the other region. The following figure shows the architecture used in this tutorial.

image

ECS instances run behind a CLB instance in each region. The public IP address of each CLB instance is placed in a separate address pool, and both address pools serve traffic under normal conditions. If the service in one region fails, GTM routes traffic to the surviving region.

Prerequisites

Before you begin, make sure you have:

Step 1: Purchase a GTM instance

  1. Log on to the Alibaba Cloud DNS console.

  2. In the left-side navigation pane, click Global Traffic Manager.

  3. Click Purchase Instance to open the GTM purchase page.

  4. Modify the configuration values as required and complete the purchase. This tutorial uses the default values for all settings.

Step 2: Configure GTM

Configure the GTM instance

  1. On the Global Traffic Manager page, find the target instance and click its instance ID, or click Configuration in the Actions column.

  2. If you are configuring the instance for the first time, select Advanced Settings in the Select Configuration Method dialog box.

  3. On the Basic Settings tab, click Edit and configure the following settings. Leave other parameters at their default values or modify them as needed. When you finish, click OK.

Setting

Value

CNAME (Internet)

Select Custom Access Domain and enter the prefix and suffix of a domain name under the current account. After you save the settings, the system automatically adds a CNAME record that points to the GTM DNS address in the DNS records for the domain. No manual configuration is required.

Global TTL Period

The effective time of the IP address returned by DNS resolution.

Alert Group

A contact group that receives notifications when an exception occurs. This setting reads the CloudMonitor alert group configuration. For more information, see Create an alert contact or alert contact group.

Configure address pools

Add two address pools and place the public IP addresses of the two CLB instances in two different address pools.

Important

Each CLB public IP address must be in a separate address pool. Do not add both CLB instances to the same address pool.

  1. On the Address Pool tab, click Create Address Pool.

  2. In the Create Address Pool panel, set the Address field in Addresses to the public IP address of a CLB instance in one region. Configure only one address in the address list. Leave other parameters at their default values or modify them as needed. When you finish, click OK.

  3. Repeat the preceding steps to add IP addresses to all address pools. Verify that the public IP addresses of the two CLB instances are in two separate address pools.

Configure health checks

Create a health check configuration for each of the two address pools.

  1. On the Address Pool tab, find the target address pool and click the Expand icon before it to expand its configuration.

  2. Click Add to the right of Health Check and configure the health check parameters. Set Health Check Protocol and Health Check Port to match the protocol and port that your backend services use. Leave other parameters at their default values or modify them as needed. When you finish, click OK.

  3. Repeat the preceding steps to configure health checks for all address pools. Verify that health checks are configured for both address pools.

Configure an access policy

Configure an access policy so that GTM returns the address pools of both regions for DNS queries. Because both address pools are primary pools, GTM relies on the health checks to route traffic away from a region whose service fails.

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

  2. On the Geographical Location-based Access Policy page, click Create Access Policy.

  3. In the Create Access Policy panel, configure the following settings. Leave other parameters at their default values or modify them as needed. When you finish, click OK.

Setting

Value

DNS Query Source

Select Global. This setting routes traffic from users in different regions or from different Internet service providers (ISPs) to the specified application service IP addresses.

Primary Address Pool Set

Select the address pools in all regions. The primary address pool set is the set of address pools that users access under normal conditions.

Step 3: Verify the result

After you configure GTM, verify that your service is accessible and that failover works.

Test normal access:

  1. In a browser, enter the CNAME access domain that you configured.

  2. Verify that the service is accessible.

Test failover:

  1. Stop the backend services in one region to simulate a failure.

  2. Wait for the health check to detect the failure and for the DNS resolution result to expire based on the Global TTL Period value, then refresh the browser.

  3. Verify that the service is still accessible. Traffic is now routed to the healthy region.

    To view detailed failover logs, go to the Global Traffic Manager instance and click the Alert Logs tab.

References

The next-generation load balancing services, Application Load Balancer (ALB) and Network Load Balancer (NLB), also support cross-region load balancing. Choose the ALB or NLB solution that fits your business requirements:

FAQ

How do I increase the QPS limit?

The theoretical QPS limit of a pay-as-you-go CLB instance is 50,000. If your business requires a higher QPS limit, use one of the following methods:

  • Create multiple CLB instances and use GTM to distribute traffic across them, which scales the QPS limit linearly. Use a weighted policy to distribute traffic proportionally across the instances. When requests are distributed across multiple clients, traffic is load-balanced by weight. For more information, see Use GTM to implement active-active load balancing and disaster recovery.

  • Switch to ALB, which provides automatically scalable performance of up to 500,000 QPS for a single virtual IP address (VIP).