This topic describes how Global Accelerator (GA) interacts with Global Traffic Manger (GTM) to accelerate DNS resolution. GA uses high-bandwidth BGP lines and the global transmission network of Alibaba Cloud. GA can interact with GTM to return accelerated IP addresses based on the geographical locations of users. The users then can connect to your web services from the nearest access point.

Prerequisites

Before you start, make sure the following requirements are met:
  • An Alibaba Cloud account is created. If you do not have an Alibaba Cloud account, click Create an Alibaba Cloud account.
  • A third-party DNS resolution service is used.

    If you use Alibaba Cloud DNS, you can set GA to interact with Alibaba Cloud DNS to conduct intelligent DNS resolution. For more information, see Global Accelerator interacts with Alibaba Cloud DNS.

  • Your website has an Internet Content Provider (ICP) filing.

Background information

A web service is deployed in the US (Silicon Valley) region. The origin server in the region provide web services through elastic IP addresses of Alibaba Cloud. The forwarding port is TCP port 80. Users reside in different regions around the world. In most cases, DNS servers return IP addresses without analyzing the geographical locations of the users. This slows down DNS resolution and connections to the web services.

You can create a GA instance, specify China (Shanghai) and China (Beijing) as the acceleration regions, and set the GA instance to interact with GTM to conduct intelligent DNS resolution. After the configuration is complete, intelligent DNS resolution returns accelerated IP addresses based on the geographical locations of the users. This can accelerate connections to the web services and reduce the network latency.

In this example:
  • Intelligent DNS resolution returns the accelerated IP address of China (Shanghai) for requests from China (Hangzhou) and China (Shanghai).
  • Intelligent DNS resolution returns the accelerated IP address of China (Beijing) for requests from other regions in mainland China.
  • Requests from regions outside mainland China are directly forwarded to the IP address of the origin server in US (Silicon Valley).
Architecture

Procedure

Procedure

Step 1: Enter the required information

You can enter the required information in the Global Accelerator console. The system then generates a list of recommended services, including a GA instance, a basic bandwidth plan, and a cross-region acceleration bandwidth plan.

Follow these steps to enter the required information.

  1. Log on to the Global Accelerator console.
  2. On the Instances page, click Purchase Guide in the upper-right corner.
    Note Skip the preceding step if you are a first-time user.
    Purchase guide
  3. In the Enter the required information to generate a list of recommended services section, enter the required information.
    • Acceleration Area: Select the area that requires acceleration. Select China (Shanghai) and China (Beijing) in this example.
    • Service Region: Select the region where the origin servers are deployed. Select US (Silicon Valley) in this example.
    • ICP Filing: If you want to accelerate a website service, specify whether you have applied for an ICP filing. If you do not want to accelerate a website service, select No. Select Yes in this example.
      Note All websites must obtain an ICP filing before they are permitted to provide services to users in mainland China. For more information, see What is an ICP filing.
    • Server Area: Specify whether the origin servers are deployed on Alibaba Cloud. Select On Alibaba Cloud in this example.
    • Peak Bandwidth Range: Peak bandwidth refers to the amount of bandwidth required during peak hours, in Mbit/s. Enter 10 in this example.
    • Maximum Concurrent Connections: The maximum number of concurrent connections that can be established to a GA instance. If the number of connections exceeds the upper limit, new connection requests are discarded. Select 5 thousand in this example.
  4. Click Generate Service List.
    After a service list is generated, you can view the list of recommended services.Intelligent recommendation

Step 2: Purchase a service bundle

You can purchase a recommended service bundle that includes a GA instance, a basic bandwidth plan, and a cross-region acceleration bandwidth plan.

Follow these steps to purchase a service bundle.

  1. Click Generate Service List.
    Generate service list
  2. On the buy page, set the following parameters for the GA instance.
    • Term: Select a subscription duration.
      Note The subscription duration is applied to all instances in a recommended service bundle. For example, if you set Term to one year, you subscribe to a GA instance, a basic bandwidth plan, and a cross-region acceleration bandwidth plan for one year.
    • Specification: Select a GA instance specification. Select Small II in this example.
      GA supports the following types of instance specifications: Small I, Small II, Small III, Medium I, Medium II, and Medium III. The acceleration performance varies, depending on the instance specification.
      Instance specification Number of acceleration regions Peak bandwidth Maximum number of concurrent connections
      Small I 1 20 Mbit/s 5,000
      Small II 2 40 Mbit/s 10,000
      Small III 3 60 Mbit/s 15,000
      Medium I 5 100 Mbit/s 25,000
      Medium II 8 160 Mbit/s 40,000
      Medium III 10 200 Mbit/s 50,000
    • Quantity: Enter the number of GA instances that you want to purchase. Set the quantity value to 1 in this example.
    • Bandwidth Type: Select the type of the basic bandwidth plan. Select Basic in this example.
      Basic bandwidth plans support three types of bandwidth: basic acceleration bandwidth, enhanced acceleration bandwidth, and premium acceleration bandwidth. The acceleration type, acceleration backend service, and acceleration scope of a basic bandwidth plan vary based on the bandwidth type, as shown in the following table.
      Bandwidth type Acceleration type Acceleration backend service Acceleration scope
      Basic acceleration bandwidth Applications that are deployed on Alibaba Cloud Alibaba Cloud Elastic IP address By default, network connections within mainland China are accelerated. If you also purchase a cross-border bandwidth plan, network connections between mainland China and areas outside mainland China are also accelerated.
      Enhanced acceleration bandwidth
      • Applications that are deployed on Alibaba Cloud
      • Applications that are not deployed on Alibaba Cloud
      • Alibaba Cloud Elastic IP address
      • Custom IP address
      • Custom domain name
      By default, network connections within mainland China are accelerated. If you also purchase a cross-border bandwidth plan, network connections between mainland China and areas outside mainland China are also accelerated.
      Premium acceleration bandwidth
      • Applications that are deployed on Alibaba Cloud
      • Applications that are not deployed on Alibaba Cloud
      • Alibaba Cloud Elastic IP address
      • Custom IP address
      • Custom domain name
      By default, network connections are accelerated on a global scale. Network traffic transmitted from mainland China to areas outside mainland China is directed to the Hong Kong (China) region and then forwarded to the global network. If you also purchase a cross-border bandwidth plan, the acceleration of network connections between mainland China and areas outside mainland China is reinforced.
    • Peak Bandwidth: Specify the peak bandwidth of the basic bandwidth plan. Set the peak bandwidth value to 10 Mb in this example.
    • Bandwidth: Specify the peak bandwidth of the cross-region acceleration bandwidth plan. Select 10 Mb in this example.
  3. Click Buy Now to complete the payment.
After you complete the payment, the basic bandwidth plan and cross-region acceleration bandwidth plan are automatically bound to the GA instance.Bandwidth plans bound to the instance

Step 3: Add an acceleration area

After you purchase a GA instance, you can add one or more acceleration areas where end users are located, and allocate bandwidth to these areas.

Follow these steps to add an acceleration area.

  1. On the Instances page, find the GA instance that you created and click the Instance ID.
  2. On the instance details page, click the Acceleration Areas tab. Then, click Add Acceleration Area.
  3. In the Add Acceleration Area dialog box, configure the following parameters as required, and click OK.
    • Acceleration Area: Select the area that requires acceleration. Select China North in this example.
    • Regions: Select the regions where the end users are located. Select China (Beijing) in this example.
    • Bandwidth: Specify the amount of bandwidth to be allocated to the region. Enter 5 Mbit/s in this example.
  4. Repeat the preceding steps to add China (Shanghai) of China East as an acceleration region, and allocate 5 Mbit/s bandwidth to this region.
After an acceleration area is added, GA assigns an accelerated IP address to the acceleration area to accelerate connections.Add an acceleration area

Step 4: Add a listener

A listener monitors connection requests from clients. GA monitors connection requests received on the specified listener ports and forwards the requests to endpoints through the specified protocol.

Follow these steps to add a listener to the GA instance.

  1. On the instance details page, click the Listeners tab. Then, click Add Listener.
  2. On the Configure Listener & Protocol wizard page, set the following listener parameters.
    • Listener Name: Enter a name for the listener to be created. The name must be 2 to 128 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter or Chinese character.
    • Protocol: Select a protocol for the listener. Select TCP in this example.
    • Port Number: Enter a port number or port range. Requests are received and then forwarded from the specified ports to the endpoints. Valid values: 1 to 65499. Enter 80 in this example.
    • Client Affinity: Select whether to enable client affinity. When client affinity is enabled, requests from a specific source (client) IP address are always routed to the same endpoint. Select Source IP Address in this example.
    Listener
  3. Click Next.

Step 5: Configure an endpoint group

Each listener is associated with an endpoint group. You can associate an endpoint group with listeners by specifying the regions to which you want to distribute network traffic. After you associate an endpoint group with a listener, traffic is distributed to the optimal endpoint in the associated endpoint group.

Follow these steps to configure an endpoint group.

  1. On the Configure Endpoint Group wizard page, configure the endpoint group as follows.
    • Endpoint Group Name: Enter a name for the endpoint group. The name must be 2 to 128 characters in length and can contain letters, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or a Chinese character.
    • Region: Select the region where the endpoint group is located. The region specifies where the origin servers are located. Select US (Silicon Valley) in this example.
    • Backend Service: Specify whether the origin servers are deployed on Alibaba Cloud. Select Alibaba Cloud in this example
    • Reserve Client IP: Specify whether to reserve client IP addresses. When this feature is enabled, the origin servers can obtain client IP addresses. Disable this feature in this example.
      Note The feature of reserving client IP addresses is available only for users who are added to the whitelist. If you are not included in the whitelist and you want to use the feature, submit a ticket.
    • Endpoint: Configure endpoints
      • Backend Service Type: Select Alibaba Cloud Elastic IP address.
      • Backend Service: Enter the Elastic IP address to be accelerated.
      • Weight: Specify weights for the endpoints. Valid values: 0 to 255. GA distributes network traffic to endpoints based on the predefined weights of the endpoints.
        Notice If you set the weight of an endpoint to 0, Global Accelerator stops distributing network traffic to the endpoint. Proceed with caution.
    Configure endpoint group
  2. Click Next to check the configurations and click Next.

Step 6: Create a GTM instance

GTM is a traffic management service that allows you to manage network traffic from clients.

To create a GTM instance, perform the following steps:

  1. Log on to the Alibaba Cloud DNS console.
  2. In the left-side navigation pane, click Global Traffic Manager.
  3. On the Global Traffic Manager page that appears, click Create Instance.
  4. On the buy page, set the following parameters for the GTM instance.
    1. Version: By default, Standard Edition is selected and cannot be changed.
      The Standard Edition plan supports the following features:
      • Health checks on IP addresses of the application services.
      • GeoDNS: switches your application workloads to specified destinations based on the geographic locations of users.
      • Disaster recovery policies for implementing DNS resolution service failovers.
      • WRR: weighted round-robin load balancing policy.
    2. Quantity: The number of GTM instances that you want to purchase.
    3. Service Time: The service duration of the GTM instance.
  5. Click Buy Now to complete the payment.

Step 7: Configure an address pool

You can configure more than one address pool for a GTM instance. Requests from different regions can be forwarded to the nearest access points through different address pools.

To configure an address pool for GTM, perform the following steps:

  1. In the left-side navigation pane, click Global Traffic Manager.
  2. On the Global Traffic Manager page, find the GTM instance created in Step 6, and click Configure in the Actions column.
  3. In the Select Configuration Method dialog box, select Advanced Settings.
  4. On the Configurations page, click the Address Pool Configurations tab, and click Create Address Pool.
  5. In the Create Address Pool dialog box, set the following parameters. Then, click Confirm.
    • Address Pool Name: Enter a name for the address pool.

      Enter the accelerated IP address of China (Beijing) in this example.

    • Address Pool Type: Select the type of the address pool.

      Only IP and Domain are supported. Select IP in this example.

    • Minimum Available Addresses: The minimum number of available IP addresses to be included in the address pool.

      An address pool contains one or more IP addresses. After the health check feature is enabled, the system dynamically shows the number of available IP addresses and quarantines unavailable IP addresses. If the number of available IP addresses is smaller than the minimum number of available IP addresses that you have specified, the system automatically sets the address pool as unavailable. In addition, access policies determine whether to switch to the alternative address pool based on the availability of the default address pool. Enter 1 in this example.

    • Address: Enter the accelerated IP address assigned by GA to the China (Beijing) region. For more information, see Step 3: Add an acceleration area.
    • Mode: Select a mode for the accelerated IP address.
      The supported modes are:
      • Smart Return: The system determines whether to return the IP address based on the health check result. If the IP address is available, DNS resolution returns the IP address to users. If the IP address is unavailable, the system temporarily deletes the IP address.
      • Always Online: The system considers the IP address available, and DNS resolution always returns this IP address to users.
      • Always Offline: The system considers the IP address unavailable, and DNS resolution does not return this IP address to users.

      Select Smart Return in this example.

  6. Repeat the preceding steps to add the accelerated IP address of China (Shanghai) and the IP address of the origin server in US (Silicon Valley) to the address pool.
    The following table shows the parameters of the address pool after you complete the configurations.
    Address pool name Address pool type Minimum available IP addresses Address Mode
    Accelerated IP address of China (Beijing) IP 1 The accelerated IP address assigned by GA to the China (Beijing) region Smart return
    Accelerated IP address of China (Shanghai) The accelerated IP address assigned by GA to the China (Shanghai) region
    The IP address of the origin server in US (Silicon Valley) The IP address of the origin server in US (Silicon Valley)

Step 8: Configure access policies

Access policies allow GA to forward requests from different access points to different origin servers. You can also specify secondary origin servers to meet your business demands.

To configure access policies for the GTM instance, perform the following steps:

  1. Click the Access Policy tab, and click Add Access Policy.
  2. In the Add Access Policy dialog box, set the following parameters. Then, click Confirm.
    • Policy Name: Enter a name for the access policy. Enter global access policy in this example.
    • Default Address Pool: Select a default address pool.

      By default, GTM forwards user traffic to the IP addresses of the origin servers in the default address pool. Select the accelerated IP address of China (Beijing) from the address pool that is configured in Step 7. For more information, see Step 7: Configure an address pool.

    • Alternative Address Pool: Select an alternative address pool.

      An alternative address pool is an IP address pool that contains IP addresses of secondary origin servers. GTM forwards requests to the secondary origin servers when the servers in the default address pool are unavailable. Select Null in this example.

    • DNS Request Sources: Select a request source.

      After you specify a region as the request source, the requests sent by users in the region are distributed by GMT to the specified origin server address pool. Select Global > Global in this example.

  3. Repeat the preceding steps to add access policies for users in the China (Hangzhou) and China (Shanghai) regions, other regions in mainland China, and regions outside mainland China.
The following table shows the parameters of the access policies after you complete the configurations.
Policy name Default address pool Alternative address pool DNS request source
Global access policy Accelerated IP address of China (Beijing) None Global > Global
Access policy for users in China (Hangzhou) and China (Shanghai) Accelerated IP address of China (Shanghai) Mainland China > East China
Access policy for users outside mainland China The IP address of the origin server in US (Silicon Valley) Overseas > Outside mainland China

Step 9: Configure basic information

After you configure the access policies, you must specify the basic information of the GTM instance. The information includes the base domain name, CNAME address, server load balancing policy, global time-to-live (TTL) value, and alert group. To configure the basic information for the GTM instance, perform the following steps:

To configure the basic information, perform the following steps:

  1. Click the Global Settings tab, and click Edit.
  2. In the dialog box that appears, set the following parameters. Then, click Confirm.
    • Instance Name: Enter the name of the GTM instance.
    • Primary Domain: Enter a base domain name. Enter www.example.com in this example.
    • CNAME Access Domain Name: Specify the type of the CNAME address for the base domain name. Select Assigned Access Domain Name in this example.
    • Balance Policy: Select a load balancing policy for the GTM instance.
      • Round Robin: This is the default load balancing policy. When an address pool contains more than one IP address, network traffic is evenly distributed to the IP addresses.
      • Weighted Round Robin: If users are distributed across the country or around the world, you can select this policy to distribute network traffic based on the capacity of each origin server in the address pool. This policy allows the system to distribute network traffic based on weights. You can set a weight for each IP address. DNS resolution returns IP addresses based on the predefined weights.

      Select Round Robin in this example.

    • Global TTL: The TTL value of the IP address that is mapped to the specified domain name. Select 1 minute(s) in this example.

      You can use GTM to manage network traffic based on domain names. Global TTL specifies the TTL of the IP address that is cached in the DNS system of the Internet Service Provider (ISP). By default, the global TTL is set to 1 minute. If you use a custom domain name, the global TTL must be the same as the minimum TTL that is supported by your DNS resolution service plan of the custom domain name.

    • Alert Group: Specify a contact group to receive notifications when an error occurs.
      Note
      • If you have not configured an alert group, log on to the Cloud Monitor console and add a contact group. For more information, see Create an alert contact or alert group.
      • If you have configured a contact group but want to configure the basic information as a Resource Access Management (RAM) user, you must first use your Alibaba Cloud account to authorize the RAM user. After the RAM user is authorized, you can log on as a RAM user to read the contact group information.
After you configure the basic information, the system automatically allocates a CNAME address to the base domain name. User requests destined for the CNAME address are resolved to the IP address of the scheduled origin server.cname

Step 10: Configure DNS resolution

You must log on to the DNS system of your service provider for resolving domain names to the CNAME address allocated by GTM. This way, network traffic is directed to the GTM instance. For more information about how to configure DNS resolution, consult your DNS service provider.

Step 11: Verify the settings

To test the DNS resolution performance after GA interacts with GTM, perform the following steps:

  1. Open the command prompt on computers in the China (Hangzhou) and China (Shanghai) regions, other regions in mainland China, and regions outside mainland China.
  2. Run the nslookup <web service domain name> command to check the DNS resolution result.
    The following results are displayed:
    • DNS resolution returns the accelerated IP address of China (Shanghai) for requests from China (Hangzhou) and China (Shanghai).
    • DNS resolution returns the accelerated IP address of China (Beijing) for requests from other regions in mainland China.
    • DNS resolution returns the IP address of the origin server in US (Silicon Valley) for requests from regions outside mainland China.