This topic describes how to use Global Accelerator (GA) to accelerate transmission of network traffic between mainland China and other areas. In the following example, GA is used to accelerate connections from mainland China to applications deployed in other areas.

Background information

The following scenario is introduced as an example. A multinational company has built two on-premises origin servers including Server 1 and Server 2 in the US (Silicon Valley) region and deployed enterprise applications on the servers. Server 1 processes only up to 20% of the total workloads. Server 2 processes up to 80% of the total workloads. Unstable network performance may cause issues such as latency, network jitters, and packet loss when users from the office in the China (Shanghai) region connect to the enterprise applications deployed in US (Silicon Valley) over the Internet.
To accelerate connections to the origin servers, you can create a GA instance that provides an access point in China (Shanghai). We recommend that you purchase a cross-border bandwidth plan to optimize acceleration performance. When users in China (Shanghai) send requests to the servers, the access point in China (Shanghai) receives the requests and forwards the requests to the endpoints in US (Silicon Valley) through intelligent routing. The system uses the endpoints to distribute 20% of the requests to Server 1 and 80% of the requests to Server 2.Accelerate transmission of network traffic between mainland China and other areas

Procedure

Procedure

Step 1: Enter the required information about the accelerated application

You can enter the required information about the accelerated application in the GA console. The system recommends the GA instance, basic bandwidth plan, and cross-border bandwidth plan to fit your service needs.

To enter the required information about the accelerated application, follow these steps:

  1. Log on to the Global Accelerator console.
  2. On the Instances page, click Purchase Guide in the upper-right corner.
    Note If this is your first time purchasing the GA service, skip this step.
    Purchase guide
  3. In the Enter the required information to generate a list of recommended services section, enter the required information in the following fields:
    • Acceleration Area: Select the area that requires acceleration. China (Shanghai) is selected in this example.
    • Service Region: Select the region where origin servers are located. US (Silicon Valley) is selected in this example.
    • ICP Filing: To accelerate a web service, specify whether you have applied for ICP filing. If the service to accelerate is not a web service, select No. In this example, No is selected.
      Note Therefore, all websites must obtain an ICP number before they are permitted to operate in mainland China. For more information, see What is an ICP filing.
    • Server Area: Specify whether the origin servers are deployed on Alibaba Cloud or in the environments outside Alibaba Cloud. Off Alibaba Cloud is selected in this example.
    • Peak Bandwidth Range: Enter the bandwidth required during peak hours. Unit: Mbit/s. The value is set to 10 in this example.
    • Maximum Concurrent Connections: Specify the maximum number of concurrent connections to the GA instance. If the number of existing concurrent connections reaches the upper limit, no extra connections are established. The value is set to 5 thousand in this example.
  4. Click Generate Service List.
    You can check the list of recommended services in the Recommended Service List section.Recommended service list

Step 2: Purchase a GA service bundle

You can purchase a GA service bundle that includes the recommended one GA instance, basic bandwidth plan, and cross-border bandwidth plan.

Follow these steps:

  1. Click Generate Service List at the bottom of the Recommended Service List section.
    Purchase a GA service bundle
  2. On the buy page, set the following parameters to purchase the required GA instance.
    • Term: Select a subscription duration.
      Note The subscription duration takes effect on the instance and bandwidth plans specified in this service bundle. For example, if you set Term to 1 Year, the subscription duration of the specified GA instance, basic bandwidth plan, and cross-border bandwidth plan are valid for one year.
    • Specification: Select a specification of the GA instance. Small I is selected 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 can vary based 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
    • Bandwidth Type: Select a bandwidth type for the basic bandwidth plan. Enhanced is selected in this example.
      Basic bandwidth plans support the following types of bandwidth: basic, enhanced, and premium. The following table shows that the acceleration type, acceleration backend service, and acceleration scope of a basic bandwidth plan can vary based on the bandwidth type.
      Bandwidth type Workload type Accelerated object Acceleration scope
      Basic bandwidth Applications that are deployed on Alibaba Cloud
      • Elastic Compute Service (ECS)
      • Server Load Balancer (SLB)
      • Alibaba Cloud public IP address
        Note If ECS instances and SLB instances run in classic networks, both types of instances are not supported.
      By default, networking within mainland China is accelerated. You can also purchase a cross-border bandwidth plan. This allows you to optimize the acceleration of networking between mainland China and other areas.
      Enhanced bandwidth
      • Applications that are deployed on Alibaba Cloud
      • Applications that are not deployed on Alibaba Cloud
      • ECS
      • SLB
      • Alibaba Cloud public IP address
      • Custom IP address
      • Custom domain name
      By default, networking within mainland China is accelerated. You can also purchase a cross-border bandwidth plan. This allows you to optimize the acceleration of networking between mainland China and other areas.
      Premium bandwidth
      • Applications that are deployed on Alibaba Cloud
      • Applications that are not deployed on Alibaba Cloud
      • ECS
      • SLB
      • Alibaba Cloud public 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 China is accelerated in the China (Hong Kong) region. If you also purchase a cross-border bandwidth plan, the acceleration of network connections between mainland China and areas outside China are reinforced.
      Note
      • You can specify ECS or SLB as the backend service type only if your account is added to the whitelist of GA. To specify ECS or SLB as the backend service type, submit a ticket.
      • Only an ECS instance or SLB instance that resides in a virtual private cloud (VPC) can be specified as an endpoint.
      • The public IP address of an endpoint group is exclusive for your use.
    • Peak Bandwidth: Specify a value as the peak bandwidth for the basic bandwidth plan. The value is set to 10Mb in this example.
    • Area A: Specify one of the areas to interconnect. Mainland China is selected in this example.
    • Area B: Specify one of the areas to interconnect. Global is selected in this example.
    • Bandwidth: Specify a value as the bandwidth of the cross-border bandwidth plan.

      We recommend that you specify the same bandwidth value for the cross-border acceleration bandwidth plan and the basic bandwidth plan. The value is set to 10Mb in this example.

  3. Click Buy Now and complete the payment.
After you purchase the service bundle, the basic bandwidth plan and cross-border bandwidth plan are automatically bound to the GA instance and changed to the Bound state.Bandwidth plans automatically bound to the GA instance

Step 3: Add an acceleration area

After you purchase a service bundle, you must add one or more acceleration areas where users are located, and allocate bandwidth to these areas.

To specify China East as an acceleration area and China (Shanghai) as a region, follow these steps:

  1. Log on to the Global Accelerator console.
  2. On the Instances page, find the GA instance that you want to manage and click the instance ID to show the details of the instance.
  3. On the Acceleration Areas tab, click Add Acceleration Area.
  4. In the Add Acceleration Area dialog box, configure the acceleration area and regions.
    • Acceleration Area: Select the area where users are located. China East is selected in this example.
    • Regions: Select the region where users are located and allocate bandwidth to the region.

      In this example, China (Shanghai) is selected and 10Mbps is specified as the bandwidth.

  5. Click OK.

Step 4: Add a listener

A listener monitors connection requests from clients and forwards the requests based on the specified protocol and port.

To add a listener to the GA instance, follow these steps:

  1. On the instance details page, click the Listeners tab. Then, click Add Listener.
  2. On the Configure Listener & Protocol wizard, set the following 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, Chinese characters, digits, underscores (_), and hyphens (-). It must start with a letter or Chinese character.

    • Protocol: Select a protocol of the listener from the drop-down list.
      • TCP: Transmission Control Protocol. TCP-based communication has the following characteristics:
        • TCP is connection-oriented and reliable. A secure connection must be established with the peer before data can be transmitted.
        • Session persistence is based on source IP addresses.
        • The source IP address is visible at the network layer.
        • Data transmission is slow.
      • UDP: User Datagram Protocol. UDP-based communication has the following characteristics:
        • UDP is not connection-oriented and is unreliable. UDP packets are transmitted without three handshakes. Fault tolerance and retransmission are not supported.
        • Data transmission is efficient.

      TCP is selected in this example.

    • Port Number: Enter a port or port range for receiving and forwarding requests to the endpoints. Valid values: 1 to 65535.

      The value is set to 80 in this example.

    • Client Affinity: Enable or disable client affinity.
      • If you select Source IP Address from the drop-down list, client affinity is enabled. Then, requests from a specific client IP address are always forwarded to the same endpoint. The client IP address is regarded as the source IP address.
      • If you select Disabled, client affinity is disabled. Then, requests from a specific client IP address are not always forwarded to the same endpoint.

      Disabled is selected in this example.

  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 a listener forwards network traffic to the associated endpoint group based on the association rules, GA distributes network traffic to the optimal endpoints of the endpoint group.

To create an endpoint group, follow these steps:

  1. In the Configure Endpoint Group wizard, set the following parameters of the endpoint group.
    • Name: Enter the name of the endpoint.

      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 Chinese character.

    • Region: Select the region to be associated with the endpoint group. US (Silicon Valley) is selected in this example.
    • Backend Service: Specify whether the origin servers are deployed on Alibaba Cloud or in the environments outside Alibaba Cloud. Off Alibaba Cloud is selected in this example.
    • Reserve Client IP: Enable or disable the origin servers to reserve client IP addresses in the specified region. After this feature is enabled, the origin servers can obtain the IP addresses of the clients that send requests. In this example, this feature is disabled.
      Note To use client IP address reservation, submit a ticket.
    • Endpoint: An endpoint is the origin server to which client requests are forwarded. In this example, Server 1 and Server 2 are specified as two endpoints.
      Specify Server 1 as an endpoint:
      • Backend Service Type: The Custom IP Address and Custom Domain Name options are available. Custom IP Address is selected in this example.
      • Backend Service: Enter the public IP address of Server 1.
      • Weight: Enter a number from 0 to 255 as the weight for the endpoint. GA forwards network traffic to the endpoint based on the specified weight. In this example, the weight of Server 1 is set to 10.
      Specify Server 2 as an endpoint:
      • Backend Service Type: Custom IP Address is selected in this example.
      • Backend Service: Enter the public IP address of Server 2.
      • Weight: Enter the weight of the endpoint. Valid values: 0 to 255. GA forwards network traffic to the endpoint based on the specified weight. In this example, the weight of Server 2 is set to 40.
    IP address endpoint
  2. Click Next.
  3. In the Check Configurations wizard, check the configurations and click Next.

Step 6: Test the acceleration of TCP traffic

To test the acceleration of TCP traffic, follow these steps:

  1. Open Command Prompt on the client located in China (Shanghai).
  2. Run the following commands to check the latency of data packet transmission.
    curl -o /dev/null -s -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" "http[s]://<IP address of the origin server>[:<Listening port>]"
    Where:
    • time_connect: the period between the time when a request is sent and when a TCP connection is established.
    • time_starttransfer: the period between the time when a request is sent and when the client receives the first byte returned by the origin server. After this period, the system starts to transmit data packets.
    • time_total: the period between the time when a request is sent and when the client receives the last byte returned by the origin server. This is the total time consumed for the communication between the client and the origin server.
    The following figures show that GA has reduced the latency of the application.
    Figure 1. Connection performance before GA is used
    Connection performance before GA is used
    Figure 2. Connection performance after GA is used
    Connection performance after GA is used
    Note If you have added a UDP listener to your GA instance, you can use UDPing to test the acceleration of UDP traffic. For more information, see Test the acceleration of UDP traffic.