All Products
Search
Document Center

Global Accelerator:Accelerate transmission of network traffic destined for a specified IP address

Last Updated:Dec 12, 2023

If issues such as high latency and packet loss occur when users connect to your applications, we recommend that you use Global Accelerator (GA) to route requests to the nearest access point of the Alibaba Cloud global network. This way, connections to your applications are accelerated. This topic describes how to use GA to accelerate connections to backend servers that have specific IP addresses.

Scenario

In this topic, the following scenario is used: The headquarters of a company is located in the US (Silicon Valley) region. The headquarters deploys enterprise applications on self-managed servers. When users from the office in the China (Hong Kong) region connect to the enterprise applications that are deployed in the US (Silicon Valley) region over the Internet, the network performance is unstable. This results in various issues such as increased latency, network jitter, and packet loss. 场景示例.png

To accelerate connections to enterprise applications, you can create a GA instance that provides an access point in the China (Hong Kong) region. When users in the China (Hong Kong) region send requests to the applications, the access point in the China (Hong Kong) region receives and forwards the requests to the endpoints in the US (Silicon Valley) region by using intelligent routing.

Procedure

配置步骤.png

Note

In this topic, a pay-as-you-go GA instance is used. Before you purchase a pay-as-you-go standard GA instance, take note of the following information:

  • Pay-as-you-go Global Accelerator instances use the pay-by-data-transfer metering method. You do not need to associate a basic bandwidth plan with pay-as-you-go GA instances. The billing of data transfer over the Global Accelerator network is managed by Cloud Data Transfer (CDT). For more information, see Pay-by-data-transfer.

  • The first time you use a pay-as-you-go Global Accelerator instance, go to the pay-as-you-go GA activation page and activate Global Accelerator as prompted.

Step 1: Configure basic information about an instance

  1. Log on to the GA console.

  2. On the Instances page, click Create GA Instance. Select Subscription Standard Instance or Pay-as-you-go Standard Instance based on your business requirements.

    In this example, Pay-as-you-go Standard Instance is selected.

  3. In the Basic Instance Configuration step, configure the following parameters and click Next.

    Parameter

    Description

    GA Instance Name

    Enter a name for the GA instance.

    Instance Billing Method

    Pay-As-You-Go is selected by default.

    You are charged instance fees, Capacity Unit (CU) fees, and data transfer fees for pay-as-you-go standard Global Accelerator instances.

    Resource Group

    Select the resource group to which the standard Global Accelerator instance belongs.

    The resource group must be created in Resource Management by the current Alibaba Cloud account. For more information, see Create a resource group.

Step 2: Configure an acceleration area

Specify acceleration regions and allocate bandwidth to each acceleration region.

In the Configure Acceleration Area step, configure the parameters and click Next. The following table describes the parameters.

Parameter

Description

Acceleration Area

Select one or more regions from the drop-down list and click Add.

In this example, the China (Hong Kong) region in the Asia Pacific section is selected.

Assign Bandwidth

Maximum Bandwidth

Specify the bandwidth for the acceleration region. Each acceleration region supports a bandwidth that ranges from 2 Mbit/s to 10,000 Mbit/s.

The maximum bandwidth is used for bandwidth throttling. The data transfer fees are managed by Cloud Data Transfer (CDT).

In this example, the default value 200 Mbit/s is used.

Important

If you specify a small value for the maximum bandwidth, throttling may occur and traffic may be dropped. Specify a maximum bandwidth based on your business requirements.

IP Protocol

Select the IP version that is used to connect to GA.

In this example, the default value IPv4 is selected.

ISP Line Type

Select an ISP line type for the GA instance.

In this example, BGP(Multi ISP) is selected.

Step 3: Configure a listener

A listener listens for connection requests and distributes the requests to endpoints based on the port and the protocol that you specify. Each listener is associated with an endpoint group. You can associate an endpoint group with a listener by specifying the region to which you want to distribute network traffic. After you associate an endpoint group with a listener, network traffic is distributed to the optimal endpoint in the endpoint group.

In the Configure listener step, configure the parameters and click Next. The following table describes the parameters.

Parameter

Description

Listener Name

Enter a name for the listener.

Routing Type

Select a routing type.

In this example, Intelligent Routing is selected.

Protocol

Select a protocol for the listener.

In this example, TCP is selected.

Port Number

Specify a listener port to receive and forward requests to endpoints. Valid values: 1 to 65499.

In this example, port 80 is used.

Client Affinity

Specify whether to enable client affinity. If you enable client affinity, requests from the same client are forwarded to the same endpoint when the client connects to a stateful application.

In this example, Source IP is selected.

Step 4: Configure an endpoint group and endpoints

  1. In the Configure an endpoint group step, configure the parameters and click Next. The following table describes the parameters.

    Parameter

    Description

    Region

    Select the region where you want to deploy the endpoint group.

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

    Endpoint Configuration

    Client requests are routed to endpoints. Configure the following parameters to configure endpoints:

    • Backend Service Type: In this example, Custom IP is selected.

    • Backend Service: Enter the IP address of the backend service that you want to accelerate.

    • Weight: Enter the weight of the endpoint. Valid values: 0 to 255. GA routes network traffic to endpoints based on the weights of the endpoints. In this example, the default value 255 is used.

    Warning

    When you set the weight of an endpoint to 0, Global Accelerator stops distributing network traffic to the endpoint. Proceed with caution.

    Preserve Client IP

    Specify whether to enable the client IP address preservation feature.

    If you enable the client IP address preservation feature, backend servers can obtain client IP addresses. If the listener uses the TCP protocol and you enable the client IP address preservation feature, you may need to configure the backend server to obtain the client source IP address. For more information, see Preserve client IP addresses.

    In this example, the client IP address preservation feature is not enabled.

    Traffic Distribution Ratio

    Specify a traffic distribution ratio for the endpoint group.

    Valid values: 0 to 100.

    In this example, the default value 100 is used.

    Health Check

    Specify whether to enable the health check feature.

    After you enable this feature, you can perform health checks to check the status of endpoints. For more information about the health check feature, see Enable and manage health checks.

    In this example, health checks are disabled.

  2. In the Configuration Review step, check the configurations and click Submit.

    Note

    It takes 3 to 5 minutes to create a Global Accelerator instance.

  3. (Optional) After you create a GA instance, you can click the instance ID on the Instances page to view the configurations of the instance. On the instance details page, you can click tabs such as Instance Information, Listeners, and Acceleration Areas.

Step 5: Test the acceleration performance

Note

If you specify UDP as the protocol when you add a listener to Global Accelerator, you can verify the acceleration performance of Global Accelerator by using UDPing. For more information, see Verify the acceleration performance of a UDP listener.

  1. Open the CLI on an on-premises machine in the China (Hong Kong) region.

  2. Run the following command to test 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>]"

    The following section describes the parameters:

    • time_connect: The period of time that is required to establish a TCP connection. Unit: seconds.

    • time_starttransfer: The start time of data transfer. The start time refers to the period of time from when the client sends a request to the backend server to when the first byte is sent to the client. Unit: seconds.

    • time_total: The total connection time. The total connection time refers to the period of time from when the client sends a request to when the client receives the last byte from the backend server. Unit: seconds.

    The test result shows that GA reduces the network latency when users in the China (Hong Kong) region access the backend services that are deployed in the US (Silicon Valley) region.

    Figure 1. Network latency before acceleration (access to the IP address of the backend service)

    加速前.png

    Figure 2. Network latency after acceleration (access to the accelerated IP address)

    配置后-HK上.png

    Note

    The acceleration performance of GA varies based on the actual workloads.

Additional information

You can use the quick GA configuration template that is provided by Resource Orchestration Service (ROS) to allow users in the China (Hong Kong) region to use an accelerated IP address to access the backend services that are deployed in the US (Silicon Valley) region. For more information, go to the Create Stack page in the ROS console and configure a GA instance as prompted.