This topic describes how to use Global Accelerator (GA) to accelerate connections to backend servers that have specific IP addresses.

Background information

The following scenario is used as an example in this topic. A company has built two on-premises backend servers Server 1 and Server 2 in the US (Silicon Valley) region and deployed enterprise applications on the servers. Server 1 processes 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 increased latency, network jitter, and packet loss. These issues arise when users from the office in the China (Hong Kong) region connect to the enterprise applications deployed in the US (Silicon Valley) region over the Internet. Accelerate transmission of network traffic destined for a specified IP address

To accelerate connections to the backend servers, you can create a GA instance that provides an access point in China (Hong Kong). When users in the China (Hong Kong) region send requests to the servers, the access point in the China (Hong Kong) region receives the requests and forwards the requests to the endpoints in the US (Silicon Valley) region 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.

Procedure

Procedure

Step 1: Enter the required information about the web service that you want to accelerate

You can enter the required information about the accelerated web service in the GA console. The system recommends the GA instance and basic bandwidth plan based on your business requirements.

  1. Log on to the Global Accelerator console.
  2. In the upper-right corner of the Instances page, click Purchase Guide.
    Note Skip the step if it is your first time using GA.
    Purchase Guide
  3. In the Enter the required information to generate a list of recommended services section, enter the required information.
    • Acceleration Region: Select the region that requires acceleration. In this example, China (Hong Kong) is selected.
    • Service Region: Select the region where the origin servers are located. In this example, US (Silicon Valley) is selected.
    • ICP Filing: If you need to accelerate a web service, select Yes. If the service is not a web service, select No. In this example, No is selected.
      Note All websites must obtain an ICP number 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 backend servers are deployed on 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 that the GA instance supports. When the number of existing concurrent connections reaches the upper limit, new connection requests are dropped. The value is set to 5 thousand in this example.
  4. Click Generate Service List.
    After a service list is generated, you can view the list of recommended services. Recommended service list

Step 2: Purchase a GA service bundle

You can purchase a GA service bundle that includes the recommended GA instance and basic bandwidth plan.

  1. Click Generate Service List.
    Generate Service List
  2. On the buy page, set the following parameters:
    • Term: Select a subscription duration.
      Note The subscription duration applies to the services in the recommended 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 is set to one year.
    • Specification: Select a specification for the GA instance that you want to create. Small I (Specification Unit) is selected in this example.
    • Bandwidth Type: Select the type of the basic bandwidth plan. Premium is selected in this example.
  3. Click Buy Now to complete the payment.
  4. After you complete the payment, associate the basic bandwidth plan with the GA instance. For more information, see Bind a basic bandwidth plan.

Step 3: Add an area to be accelerated

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

  1. On the Instances page, find the GA instance and click its ID.
  2. Click the Acceleration Area tab, and click Add Region on the Asia Pacific tab.
  3. In the Add Acceleration Area dialog box, set the following parameters:
    • Regions: Select the region where users are located. In this example, China (Hong Kong) is selected.
    • Bandwidth: Select a bandwidth value for the acceleration service. The value is set to 10 Mbit/s in this example.
    • Internet Protocol: Select the IP version that is used to connect the clients to GA. IPv4 is selected in this example.
  4. Click OK.
    After you add a region, the system assigns an accelerated IP address to the region that is added to the GA instance. This accelerated IP address is used to forward requests from users in the specified region to the specified origin server through GA and accelerate connections to the origin server. Accelerated IP address

Step 4: Add a listener

Listeners are used to monitor connection requests from clients. GA monitors connection requests received on the specified listener ports and forwards the requests to endpoints through the specified protocol.

  1. On the instance details page, click the Listeners tab and then click Add Listener.
  2. In the Configure Listener & Protocol wizard, set the following parameters for the listener:
    Listener
    Parameter Description
    Listener Name Enter a name for the listener.

    The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

    Protocol Select the protocol of the listener.

    In this example, TCP is selected.

    Port Number Specify a port for the listener. The port is used to receive and forward requests to endpoints. Valid values: 1 to 65499.

    The value is set to 80 in this example.

    Client Affinity Specify whether to enable client affinity. If client affinity is enabled, requests from the same client can be directed to the same endpoint when the client accesses a stateful application.

    In this example, Source IP Address is selected.

  3. Click Next to configure an endpoint group.

Step 5: Configure an endpoint group

Each listener is associated with an endpoint group. You can associate an endpoint group with a listener 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.

  1. On the Configure Endpoint Group wizard page, set the following parameters for the endpoint group:
    IP address endpoint
    Parameter Description
    Endpoint Group Name Enter a name for the endpoint group.

    The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

    Region Select the region to which the endpoint group and backend servers belong.

    In this example, US (Silicon Valley) is selected.

    Backend Service Specify whether to deploy the backend service on Alibaba Cloud.

    Off Alibaba Cloud is selected in this example.

    Reserve Client IP Specify whether to reserve client IP addresses. After the feature is enabled, backend servers can obtain source IP addresses of clients.

    In this example, this feature is disabled.

    Note This feature is available to only Alibaba Cloud accounts that are included in the whitelist. To use this feature,submit a ticket.
    Endpoint An endpoint serves as the destination that a client requests to access. Set the following parameters to configure an endpoint:
    1. To configure Server 1 as an endpoint, set the following parameters:
      • Backend Service Type: Select Custom IP Address from the drop-down list.
      • Backend Service: Enter the IP address that you want to accelerate. In this example, the IP address of Server 1 is specified.
      • Weight: Specify a weight for the endpoint. Valid values: 0 to 255. GA routes network traffic to endpoints based on the specified weights. In this example, the weight of Server 1 is set to 10.
    2. Click Add Endpoint to configure Server 2 as an endpoint. Set the following parameters:
      • Backend Service Type: Select Custom IP Address from the drop-down list.
      • Backend Service: Enter the IP address of Server 2.
      • Weight: Set the weight of Server 2 to 40.
    Notice If you set the weight of an endpoint to 0, GA does not route network traffic to the endpoint. Proceed with caution.
  2. Click Next, confirm the configurations of the listener and endpoint, and then click Submit.

Step 6: Test the acceleration performance

Note If you specify UDP as the protocol when you add a listener, you can test the acceleration performance by using UDPing. For more information, see Test the acceleration of UDP traffic.
  1. Open the command-line interface of an on-premises device. In this example, the device is located in the China (Hong Kong) region.
  2. Run the following command to query the network latency:
    curl -o /dev/null -s -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" "http[s]://<accelerated IP address>[:<port>]"
    where:
    • time_connect: the period of time that it takes to establish a TCP connection.
    • time_starttransfer: the start time of data transfer. It refers to the time that it takes for the backend server to send the first byte after the client sends a request.
    • time_total: the total connection time. It refers to the time that it takes for the backend server to respond after the client sends a request.
    The test result shows that GA has reduced the network latency of the application.
    Figure 1. The network latency of data transmission before GA is used
    The network latency of data transmission before GA is used
    Figure 2. The network latency of data transmission after GA is used
    The latency of data transmission after GA is used