You can connect a domain name to Global Traffic Manager (GTM) to implement intelligent scheduling, global load balancing, and automatic failovers that ensure business continuity.
Choose an access method
You can connect a domain name in two ways: the CNAME Access Method and the Service Domain Name Access Method. The following table provides a comparison of these methods.
Evaluation dimension | CNAME access method | Service domain name access method |
Core principle |
|
|
Domain hosting requirements | Requires an additional domain name or subdomain to host the GTM instance. The service domain name can be hosted on Alibaba Cloud DNS or by another DNS provider. | Does not require an additional domain name. You can directly configure the service domain name that is hosted on Alibaba Cloud DNS. |
Resolution performance | Involves an extra CNAME query, which theoretically adds a few milliseconds of latency compared to the service domain name access method. | Optimal. No extra DNS queries are required, which provides the highest resolution performance. |
Recommended scenarios |
|
|
Scenario 1: Your service domain name www.example.com
is a stable, online service, and you want to use GTM 3.0 for failover. In this case, use the CNAME Access Method. Create an access domain name using another primary domain or subdomain, such as gtm.cloud-example.net
. After you verify that failover works, go to your DNS provider, modify the DNS records for www.example.com
, and add a CNAME
record that points to gtm.cloud-example.net
.
Scenario 2: A new service requires maximum resolution performance, and its domain name www.example.com
is hosted on Alibaba Cloud DNS. In this case, you can directly create www.example.com
as the access domain name. After you configure the address pools, addresses, and load balancing policies, you can enable the access domain name.
Create an access domain name
Prerequisites
If you choose the subscription billing method, you must create a GTM instance in advance. For more information, see Purchase a subscription instance. If you choose the pay-as-you-go billing method, you do not need to create a GTM instance in advance.
The domain that you want to use for the access domain name must be hosted on Alibaba Cloud DNS.
An access domain name consists of a
host record
and aprimary or subdomain
. The Primary Or Subdomain is populated from the list of domain names managed by Alibaba Cloud DNS. Ensure that the correct DNS server addresses are configured for the Primary Or Subdomain.
Steps
Go to the Alibaba Cloud DNS - Global Traffic Manager console and click Create Access Domain Name.
In the dialog box that appears, select a common scenario or select Custom Scenario.
Move the pointer over the Access Domain Name icon. In the pop-up window, click Basic Configuration.
Complete the form to configure the access domain name. The following table describes the parameters.
Parameter
Description
Billing Method
Options:
Subscription
Pay-as-you-go
Bind Instance
If you set Billing Method to Subscription, you must bind an available subscription GTM instance.
If you set Billing Method to Pay-as-you-go, the system automatically binds a GTM instance that cannot be changed.
Access Domain Name
Consists of
host record
.primary or subdomain
.Host Record: The system generates a default host record. You can also customize it to another host record, or even a multi-level host record, such as
biz
orprod.biz
.Primary/Subdomain: A primary domain name or subdomain hosted by the public authoritative DNS.
Record Type
The record type of the address pool that requires intelligent scheduling. Supported record types are A, AAAA, and CNAME. The corresponding address pool types are IPv4, IPv6, and Domain Name.
Global TTL
GTM provides traffic management services in the form of domain names. Global Time to Live (TTL) is the amount of time that the DNS record, which resolves the access domain name to an address, is cached on a carrier's local DNS server.
Enabled Status
The status of the domain name instance. The default status is disabled. In this state, the GTM configuration policy is not in effect, and no resolution service is provided. We recommend that you enable the instance and connect it for resolution only after you finish configuring the address pools, addresses, and load balancing policies.
ImportantIf your service domain name, such as
www.example.com
, already has a DNS record of the same type in Alibaba Cloud DNS, that record becomes invalid after you enable the GTM domain name instance. The intelligent resolution configured in GTM takes precedence.Remarks
A user-defined identifier to help you remember and recognize the application service associated with this instance.
View the access domain name list
After you create an access domain name, it is added to the instance list. The following table describes the key fields in the list.
Field | Description | Example value |
Access Domain Name/Instance ID | Access Domain Name: The full domain name that is connected. It consists of a Instance ID: After you purchase a GTM instance, the system automatically generates an instance ID. The instance ID is the unique identifier for the application service and is used for processes such as upgrades, renewals, and releases. |
|
Service Availability Status | The current availability status of the GTM instance. The status can be Available, Unavailable, or Unavailable (Failover Resolution In Progress). Available: If the access domain name status is Enabled and the health check status is Normal, the service availability status is Available. Unavailable: If the access domain name status is Disabled, the service availability status is Unavailable, regardless of the health check status. Unavailable (Failover Resolution In Progress): If the access domain name status is Enabled and the health status is Abnormal, the service availability status is Unavailable (Failover Resolution In Progress). In this state, GTM performs failover resolution to provide a resolution result to the client whenever possible. Important Failover resolution rules:
| Available |
Load Balancing (Between Address Pools) | The load balancing policies between address pools include Polling, Sequential, Weighted, and Source Proximity. For more information, see Configure load balancing policies between address pools. | Polling |
Paid Edition | The billing type of the GTM instance. Types include the following: Subscription/Standard Edition, Subscription/Ultimate Edition, and Pay-as-you-go. | Pay-as-you-go |
Enabled Status | The status of the access domain name. The status can be Enabled or Disabled. When disabled, the intelligent scheduling policy for the GTM instance is unavailable. | Enabled |
Health Status | The health status of the access domain name instance. The status can be Normal, Warning, or Abnormal. Normal: All address pools referenced by the access domain name are available. The health status of the domain name instance is Normal. Warning: Some of the address pools referenced by the access domain name are unavailable. The health status of the domain name instance is Warning. In this state, resolution for available address pools proceeds normally, while resolution for unavailable address pools is stopped. Abnormal: All address pools referenced by the access domain name are unavailable. The health status of the domain name instance is Abnormal. In this case, failover resolution is performed using an address from the first referenced non-empty address pool to provide a resolution result to the client whenever possible. | Normal |
Enable an access domain name
To prevent domain name resolution errors, do not enable an access domain name until you have configured its address pools, addresses, and load balancing policies. To enable an access domain name, perform the following steps.
Go to the Alibaba Cloud DNS - Global Traffic Manager console and find the target access domain name.
Confirm that the access domain name is currently Disabled and that its health status is Normal.
If the domain name currently provides online services through public authoritative DNS, confirm that the address pools, addresses, and load balancing policies are correctly configured. We recommend that you perform this change during off-peak hours.
Click the switch in the Enabled Status column. In the prompt that appears, confirm the risks and click Enable.
After you enable the access domain name, if your service domain name, such as
www.example.com
, already has a DNS record of the same type in Alibaba Cloud DNS, that record is overridden. The intelligent resolution configured in GTM takes precedence.
Disable or delete an access domain name
If you disable or delete an access domain name, GTM stops providing resolution services for it. The original DNS record of the same type for that domain name in Alibaba Cloud DNS will be used for resolution again.
Go to the Alibaba Cloud DNS - Global Traffic Manager console and find the target access domain name.
Click the switch in the Enabled Status column. In the prompt that appears, confirm the risks to disable the access domain name.
In the Actions column, click Delete. In the prompt that appears, confirm the risks to delete the domain name.
After you delete an access domain name, its resolution results may still be retrievable for a period. This occurs because local DNS servers of various network carriers cache DNS records. Until the cache expires, these local DNS servers return cached results to visitors instead of querying Alibaba Cloud DNS for the latest records. The change takes effect only after the local cache on the carriers' servers is refreshed. The time required for the change to take effect depends on the TTL of the cached DNS record. The change is expected to take effect in a minimum of 10 to 30 minutes.