Integrate GA to Accelerate Applications
When users from multiple regions around the world access your Application Load Balancer (ALB)-hosted services, poor public network quality can cause high latency, jitter, and packet loss, degrading the end user experience. Use Alibaba Cloud Global Accelerator (GA) to accelerate your application. End user requests connect to the nearest Alibaba Cloud point of presence and travel over Alibaba Cloud’s private backbone network to reach your application servers. ALB integrates GA directly—configure a GA accelerator in the ALB console with one click to simplify setup.
Overview of ALB integration with GA
Global Accelerator (GA) is a worldwide network acceleration service that leverages Alibaba Cloud’s premium Border Gateway Protocol (BGP) bandwidth and global transmission network to provide low-latency, high-availability connectivity across regions. GA reduces the impact of latency, jitter, and packet loss on service quality. For more information, see What is Global Accelerator.
ALB integrates GA directly. You can configure a GA accelerator in the ALB console with one click, eliminating the need to switch between the ALB and GA consoles and simplifying the process of accelerating ALB-hosted applications with GA.
Key features
Application acceleration: Improve the end user experience for global users through network acceleration.
Simplified configuration: Set up an accelerator in the ALB console with one click to reduce configuration complexity.
Scenarios
This solution works best when your application must serve end users across multiple global regions:
Game platform acceleration: Accelerate game platform services such as login or store systems to reduce slow logins and other negative user feedback.
Enterprise application acceleration: Accelerate cross-border enterprise applications to improve global employee access and boost collaboration efficiency.
Internet application acceleration: Accelerate internet-facing applications to enhance user experience and engagement, helping you build popular products.
Scenario example
A company deploys a highly available service using ALB in one Alibaba Cloud region and serves end users globally. Due to poor public network quality, some users experience high latency, which affects their experience.
To solve this, the company uses ALB’s integrated Global Accelerator (GA) feature. End user requests now connect to the nearest Alibaba Cloud point of presence and are accelerated over Alibaba Cloud’s private network, improving user experience.
Limits
Each ALB instance can be associated with only one GA instance for acceleration.
The following ALB instances do not support application acceleration:
The ALB instance has no listeners configured.
The ALB instance or its listener is being upgraded or downgraded.
The ALB instance has a QUIC listener configured.
The ALB instance has an HTTPS listener with any of the following configurations:
Mutual authentication is enabled.
A custom TLS security policy is used.
Extended certificates are configured.
The ALB instance has a listener associated with a backend server group that uses the gRPC protocol.
The ALB instance is deployed in a region where GA is not available. For details on GA-supported regions, see Acceleration regions and supported areas.
The public IP address range of the GA instance’s endpoint is either in the ACL blacklist of the public ALB listener or conflicts with addresses in the ACL whitelist. For information on how to obtain the public IP address of a GA instance endpoint, see How to obtain the public IP address of a Global Accelerator instance endpoint?
Prerequisites
You have created an ALB instance (both public and private ALB instances are supported). For more information, see Create and manage ALB instances.
You have created a server group. For more information, see Create and manage server groups.
You have added ECS01 and ECS02 instances to the server group and deployed application services on both.
You have registered a domain name, completed ICP filing, and configured CNAME resolution for ALB using your domain.
You have created a listener. For more information, see Add an HTTP listener or Add an HTTPS listener. If you use an HTTPS listener, purchase a certificate or upload a third-party certificate to SSL Certificate Service and bind it to your domain. For more information about creating certificates, see Use a commercial certificate to enable HTTPS for your website.
Procedure
Step 1: Enable application acceleration for your ALB instance
Log on to the Application Load Balancer (ALB) console.
In the top menu bar, select the region where your instance is deployed.
On the Instances page, find your target instance and click its instance ID.
On the Integrated Services tab, click Create GA.
Activate GA: If you have never used GA, read the Global Accelerator Service Agreement and check the box to activate the service.
Acceleration Area: Acceleration regions are the geographic areas where you want to accelerate access. Choose the region where your clients are located or the nearest region. Each acceleration region includes one or more Alibaba Cloud regions.
NoteIf your acceleration region includes the Chinese mainland or your backend servers are deployed in the Chinese mainland, you must complete ICP filing for your custom domain name.
If your acceleration region and origin server region involve cross-border access, read the Compliance Commitments Regarding Cross-border Data Transfers and check the box to agree. Premium bandwidth for cross-border acceleration is enabled by default.
After completing the configuration, click OK.
ImportantThe first time you enable acceleration, all listener configurations from your ALB instance are synchronized to GA. Subsequent changes to ALB listeners are not automatically synchronized. You must manually update them in the GA console.
Step 2: Configure domain name resolution for GA
After enabling GA acceleration for your ALB instance, the Integrated Services page displays information about the created GA instance, including its DNS name.
Copy the GA instance’s DNS name. Then add a CNAME record that points your custom domain to this DNS name.
On the Domain Name Resolution page, find your target domain and click Settings in the Actions column.
NoteFor domains not registered with Alibaba Cloud, you must first add the domain to the Cloud DNS console before you can configure DNS records.
On the DNS settings page, click Add Record, configure the CNAME record, and then click OK.
Setting
Description
Record Type
Select CNAME from the drop-down list.
Hostname
The prefix of your domain name. In this example, enter @.
NoteWhen creating a record for a root domain, set the host record to
@.Query Source
Select Default.
TTL
TTL (Time To Live) specifies how long DNS records are cached on DNS servers. Use the default value in this example.
Record Value
Enter the CNAME address corresponding to the domain name, which is the DNS name of the GA instance that you copied.
Step 3: Verify acceleration performance
This test uses a public ALB instance with backend servers in US (Silicon Valley) and clients in the Hong Kong (China) acceleration region.
Test network latency after acceleration:
Access
http://<your-GA-domain>in a browser. The backend service loads normally. Refresh the browser multiple times to switch between ECS01 and ECS02.Run
curl -o /dev/null -s -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" "http[s]://<your-GA-domain>"to check packet latency after acceleration.After acceleration, the output looks like this:
[root@xxx xxx ~]# curl -o /dev/null -s -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" "http://lxxx.cn" time_connect: 0.006 time_starttransfer: 0.008 time_total: 0.008
Test network latency before acceleration:
Access
http://<your-ALB-domain>in a browser. The backend service loads normally. Refresh the browser multiple times to switch between ECS01 and ECS02.Run
curl -o /dev/null -s -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" "http[s]://<your-ALB-domain>"to check packet latency before acceleration.Before acceleration, the output looks like this:
[root@xxx ~]# curl -o /dev/null -s -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" "http://bxxx.cn" time_connect: 0.162 time_starttransfer: 0.320 time_total: 0.321
Compare acceleration results:
Parameter descriptions:
time_connect: Connection time—the time from request start until the TCP connection is established (in seconds).
time_starttransfer: Time to first byte—the time from request start until the first byte is received from the backend server (in seconds).
time_total: Total time—the time from request start until the full response is received (in seconds).
Parameter
After acceleration (seconds)
Before acceleration (seconds)
Acceleration Data Reference (in Seconds)
Acceleration Reference (Percentage)
time_connect
0.006
0.162
Improvement: 0.156
96.3% faster
time_starttransfer
0.008
0.320
Improvement: 0.312
97.5% faster
time_total
0.008
0.321
Improvement: 0.313
97.5% faster
NoteThe example data shown here is for reference only. Actual acceleration results depend on your specific business and testing environment.
Additional operations
View acceleration status
On the Integrated Services page for your instance, the Global Accelerator card displays the GA instance ID, DNS name, instance status, and other details.
Disable application acceleration
To disable GA acceleration for your ALB instance, delete the GA instance in the GA console or remove the associated ALB listener and endpoint group.
FAQ
What type of GA instance is created?
A pay-as-you-go standard GA instance.
How does enabling application acceleration affect billing?
Enabling application acceleration adds GA-related charges, including instance fees, CU fees, and traffic fees. For details, see Billing for pay-as-you-go Global Accelerator instances.
Why isn’t my updated ALB listener accelerated?
When you first enable GA integration, all ALB listener configurations are synchronized to GA. Subsequent changes to ALB listeners are not automatically synchronized. You must manually update them in the GA console.
Why did my ALB access control policy stop working after acceleration?
After GA acceleration, end users access your service through the GA DNS name. Therefore, the ALB access control policy no longer applies.
To enforce similar IP-based access control, configure an access control policy in GA. For more information, see GA access control.
References
For cross-border scenarios, premium bandwidth is used by default. If you require higher network quality, consider using China Unicom’s cross-border leased line. For more information, see Accelerator configuration options.