Overview
Global Traffic Manager (GTM) allows you to manage the addresses of application services by using address pools. An address pool is a group of IP addresses or domain names that are used to access the same application service. The IP addresses or domain names in an address pool belong to the same Internet service provider (ISP) or reside in the same region. You can configure multiple address pools for a GTM instance. This way, requests from different regions can be forwarded to the nearest address pools. If the address pool set to which address pools belong is unavailable, another address pool set is used for a failover.
Description of configuration parameters
Basic configuration parameters
Address Pool Name
Enter an address pool name that is easy to identify and remember, for example, test. When you configure an access policy, you can distinguish address pools based on their names.
Service Availability: the service availability of the address pool. Valid values: Available and Unavailable.
Available: If the address pool is enabled and the health status is Normal, the address pool is deemed available.
Unavailable: If the address pool is disabled or the health status is Abnormal, the address pool is deemed unavailable.
The following table describes the priorities to determine the availability of the address pool.
Enabling status
Health status
Service availability
Enabled
Normal or Warning
Available
Enabled
Abnormal
Unavailable
Disabled
Normal, Warning, or Abnormal
Unavailable
NoteHealth Status
Normal: If all addresses in the address pool are available, the health status is Normal.
Warning: Some addresses in the address pool are unavailable. However, the number of unavailable addresses does not exceed the threshold specified for determining the unhealthy status of the address pool, and the address pool enters into the Warning state. In this case, the available addresses in the address pool are returned as expected, and the unavailable addresses cannot be returned.
Abnormal: If the number of unavailable addresses in the address pool exceeds the threshold specified for determining the unhealthy status of the address pool, the address pool enters into the Abnormal state. In this case, the addresses in the address pool cannot be returned.
Address Pool Type
Addresses in address pools can be IP addresses and domain names. IPv4 and IPv6 addresses are supported.
Conditions for Determining Address Pool Health Status
This parameter is used to determine whether the address pool is available. If the number of available addresses in the address pool is less than the value specified by this parameter, the address pool is deemed unavailable.
Enabling Status
By default, the value of the Enabling Status parameter is Enable. If you set this parameter to Disable, GTM does not return addresses in the address pool.
Remarks
The additional description that can remind you of the address pool.
Parameters for configuring the policies of load balancing between addresses
The policies of load balancing between addresses are Poll, Order, Weight, and Closest to Source.
Poll: returns all addresses in the address pool for domain name system (DNS) requests from any source. All addresses are sorted in round-robin mode each time they are returned. Example:
First return: IP Address 1, IP Address 2, and IP Address 3
Second return: IP Address 3, IP Address 1, and IP Address 2
Third return: IP Address 2, IP Address 3, and IP Address 1
Fourth return: IP Address 1, IP Address 2, and IP Address 3
If multiple IP addresses are returned to an access client, the access client selects one of the IP addresses based on a preference mechanism. For example, the access client selects an IP address with the optimal route or an IP address that ranks first.
Order: The address with the smallest sequence number is returned for DNS requests from any source. The sequence number specifies the priority for returning the address. A smaller sequence number specifies a higher priority. If the address with the smallest sequence number is unavailable, the address with the second smallest sequence number is returned. If you select Order for Load Balancing Policy for Addresses, you must configure the Prior Resource Recovery Mode parameter. Valid values: Preemptible Mode and Non-preemptible Mode.
Preemptible Mode: The address with the smallest sequence number is preferentially used if this address is recovered.
Non-preemptible Mode: The current address is still used even if the address with the smallest sequence number is recovered.
Example: The sequence number of IP Address 1 is 1, the sequence number of IP Address 2 is 2, and the sequence number of IP Address 3 is 3.
In preemptible mode:
GTM always returns IP Address 1 as long as IP Address 1 is available.
If IP Address 1 is unavailable, GTM returns IP Address 2. If both IP Address 1 and IP Address 2 are unavailable, GTM returns IP Address 3. If both IP Address 1 and IP Address 2 are recovered, GTM returns IP Address 1.
In non-preemptible mode:
GTM always returns IP Address 1 as long as IP Address 1 is available.
If IP Address 1 is unavailable, GTM returns IP Address 2. If both IP Address 1 and IP Address 2 are unavailable, GTM returns IP Address 3. If both IP Address 1 and IP Address 2 are recovered, GTM still returns IP Address 3.
WarningWe recommend that you select Non-preemptible Mode if your data centers in disaster recovery mode use the one-way data synchronization mode. Reason: In the normal state, GTM always returns IP Address 1. If IP Address 1 is unavailable, GTM returns IP Address 2. However, newly generated data cannot be synchronized to IP Address 1 in a timely manner during the period when users visit IP Address 2. In this case, if you select Preemptible Mode, GTM still returns IP Address 1 when IP Address 1 is recovered. This may cause business exceptions.
Weight: You can set a different weight value for each address. This way, GTM returns addresses based on the weight values. The weight policy is applicable when traffic needs to be switched between new and old data centers.
NoteThe weight values can be integers from 1 to 100.
ImportantYou may find that DNS records are not returned based on the weight settings during the test. This is a common occurrence. The cause is that weighted round-robin is a coarse-grained method to schedule traffic based on the weight of an address in a DNS record. Weighted round-robin is set to process requests from local DNS servers. However, local DNS servers request the authoritative DNS, which is Alibaba Cloud DNS in this example, only once within the time to live (TTL) period.
For example, your domain name is visited by users in both the China (Shanghai) and China (Beijing) regions. In this example, Local DNS A is specified to process requests from users in Shanghai and Local DNS B is specified to process requests from users in Beijing. When Local DNS A and Local DNS B initiate queries to GTM, GTM returns addresses based on the configured weight values. However, GTM returns the same addresses to all users that are specified with the same local DNS server within the TTL period.
Closest to Source: GTM returns different IP addresses based on the sources of DNS requests.
Request Source: the source of a DNS request. GTM schedules DNS requests based on the egress IP addresses of the local DNS servers used by access clients. If the local DNS server used by an access client supports EDNS Client Subnet (ECS), GTM can also perform intelligent scheduling based on the IP address of the access client.
Procedure
Configure basic settings
Log on to the Alibaba Cloud DNS console.
In the left-side navigation pane, click Global Traffic Manager. On the page that appears, click the Global Traffic Manager3.0 tab.
Click the Address Pool Configuration tab and click Create Address Pool.
On the Create Address Pool page, move the pointer over the address pool icon and click Basic Configuration.
In the Basic Address Pool Configuration panel, set the parameters and click Submit Configuration.
Add addresses to the address pool
After the basic address pool configurations are complete, on the Address Pool page, move the pointer over the address pool icon and click Select Existing Address.
NoteIf you have not configured addresses, click Add Address to add addresses. For more information, see Configure an address.
After you add the addresses, click Submit Configuration.
Configure a policy for load balancing between addresses
The default value of Load Balancing Policy for Addresses is Poll. In this example, Order (Preemptible Mode) is used.
After you add the addresses to the address pool, on the Address Pool page, move the pointer over Poll and click Configure Load Balancing Policy.
On the Load Balancing Policy Configuration for Addresses panel, select Order from the Load Balancing Policy for Addresses drop-down list and select Preemptible Mode from the Prior Resource Recovery Mode drop-down list. Click Submit Configuration.
On the Address Pool page, move the pointer over Sequence No. and click Adjust Sequence Number. Drag and drop an address up or down to adjust the sequence number. Then, click Submit Configuration.
If an address is in gray on the configuration view page, you can move the pointer over the address icon and click Cancel Reference to Current Address to remove the address from the address pool. However, the address is not removed from the address list.