After you create an intelligent routing listener for a Global Accelerator instance, the GA instance automatically selects a nearby and healthy endpoint group and forwards client requests to the optimal endpoint in the endpoint group. This topic describes how to add and manage intelligent routing listeners.
Prerequisites
A standard Global Accelerator instance is created. For more information, see Create and manage standard GA instances.
If you want to configure HTTPS listeners, make sure that an SSL certificate is purchased and a certificate signing request is submitted to the certificate authority (CA). For more information, see Purchase an SSL certificate and Submit a certificate application.
If the bandwidth metering method is pay-by-bandwidth, make sure that a basic bandwidth plan is purchased and associated with the GA instance.
Add a TCP or UDP listener
Configure the listener and protocol.
Log on to the GA console.
On the Instances page, find the GA instance that you want to manage and click Configure Listeners in the Actions column.
On the Listeners tab, click Add Listener.
NoteThe first time that you add a listener or if the specified Global Accelerator instance is not configured with a listener, skip this step.
On the Configure Listener & Protocol wizard page, configure parameters and click Next. The following table describes the parameters.
Parameter
Description
Listener Name
Enter a name for the listener.
Routing Type
Select a route type. In this topic, Intelligent Routing is selected.
Intelligent Routing: automatically selects a nearby and healthy endpoint group based on network latency and forwards client requests to the optimal endpoint in the endpoint group.
Custom Routing: generates a port mapping table based on the listener port range, the port ranges of the destination endpoint groups, and the IP addresses of endpoints (vSwitches). This way, traffic is routed to the specific IP addresses and ports of specified vSwitches. For more information about how to configure a custom routing listener, see Add and manage custom routing listeners.
NoteCustom routing listeners are in invitational preview. To use custom routing listeners, submit an application to your account manager. After your application is approved, you can use custom routing listeners.
Protocol
Select a network transmission protocol for the listener. Valid values:
TCP
TCP is a connection-oriented protocol that provides high reliability. Before data can be transmitted, you must establish a logical connection.
Session persistence is based on source IP addresses.
Source IP addresses are visible at the network layer.
Data is transmitted at a slow rate.
UDP
A connectionless and unreliable protocol. Three-way handshakes are not required before UDP packets are transmitted. UDP does not provide error recovery or data retransmission.
Data is transmitted at a high rate.
Port Number
Specify the listener port. The listener port is used to receive requests and forward requests to endpoints. Valid values: 1 to 65499.
You can specify up to 30 listener ports for each listener. Separate multiple listener ports with commas (,). Example: 80,90,8080.
If you want to specify a port range, you can use a tilde (~). Example: 80~85.
NoteIf you add listeners that use the same protocol to a Global Accelerator instance, configure different ports for the listeners.
You can specify more than 300 consecutive listener ports for a listener in specific regions. For more information, see Advanced listeners.
Client Affinity
Specify whether to enable client affinity.
If you select Source IP Address from the drop-down list, client affinity is enabled. In this case, requests from a client IP address are forwarded to the same endpoint.
If you select Disabled from the drop-down list, client affinity is disabled. In this case, requests from a client IP address may be forwarded to different endpoints.
Configure endpoints.
Each listener is associated with an endpoint group. You can specify the region to which you want to forward network traffic to associate an endpoint group with a listener. After you associate an endpoint group with a listener, traffic is forwarded to the optimal endpoint in the associated endpoint group.
On the Configure Endpoint Group wizard page, configure the parameters and click Next. The following table describes the parameters.
This topic describes only how to configure endpoints and endpoint groups. For information about health checks, see Create a default endpoint group. For more information about endpoints and endpoint groups, see Overview.
Parameter
Description
Endpoint Group Name
Specify a name for the endpoint group.
Region
Select the region where you want to deploy the endpoint group.
Traffic Distribution Ratio
Specify a traffic distribution ratio for the endpoint group. Unit: %.
Valid values: 0 to 100.
Note- You can set the Traffic Distribution Ratio parameter only when you create an endpoint group for a TCP or UDP listener. For more information about how to set traffic distribution ratios, see Distribute traffic across endpoint groups in different scenarios.
- A value of 0 specifies that no traffic is forwarded to the endpoint group. A value of 100 specifies that all traffic is forwarded to the endpoint group.
Backend Service
Specify whether backend servers are deployed on Alibaba Cloud.
- Alibaba Cloud: Backend servers are deployed on Alibaba Cloud.
- Off Alibaba Cloud: Backend servers are not deployed on Alibaba Cloud.
Preserve Client IP
Specify whether to preserve client IP addresses.
After you enable this feature, backend servers can retrieve client IP addresses. For more information, see Preserve client IP addresses.
Endpoint
Endpoints are the destinations of client requests. To add an endpoint, configure the following parameters:
- Backend Service Type: If your backend server is deployed on Alibaba Cloud, you can select Alibaba Cloud Public IP Address, ECS, CLB, ALB, or OSS. If your backend server is not deployed on Alibaba Cloud, you can select Custom IP Address or Custom Domain Name. Note
- By default, you cannot specify Elastic Compute Service (ECS) instances in virtual private clouds (VPCs), internal-facing Classic Load Balancer (CLB) instances, or internal-facing Application Load Balancer (ALB) instances as endpoints for standard GA instances. To specify these instances as endpoints, contact your account manager.
- The IP addresses of endpoints associated with each GA instance must be globally unique and cannot be duplicates of other GA instances.
- If no service-linked role exists when you specify Elastic Compute Service (ECS) instances, Classic Load Balancer (CLB) instances, Application Load Balancer (ALB) instances, or Object Storage Service (OSS) buckets as endpoints, the system automatically creates the corresponding service-linked role. For more information, see AliyunServiceRoleForGaVpcEndpoint, AliyunServiceRoleForGaAlb, and AliyunServiceRoleForGaOss.
- Backend Service: Enter the IP address, domain name, or instance ID of the backend server.
- Weight: Specify a weight for the endpoint. Valid values: 0 to 255. GA distributes network traffic to endpoints based on their weights. Warning
If the weight of an endpoint is set to 0, GA stops distributing network traffic to the endpoint. Proceed with caution.
You can click + Add Endpoint to add more endpoints. You can create at most four endpoints in each endpoint group. If you want to add more endpoints, go to the Quota Management page and increase the quota. For more information, see Manage GA quotas.
Confirm the configurations.
On the Confirm wizard page, confirm the configurations of the listener and the endpoints, and then click Submit.
If you want to modify a setting, click Modify that corresponds to the setting. Then, you are redirected to the configuration page.
If the bandwidth metering method of your Global Accelerator instance is pay-by-data-transfer and your business involves cross-border acceleration between the Chinese mainland and regions outside the Chinese mainland, including China (Hong Kong), China (Macao), and China (Taiwan), you must enable cross-border acceleration for your Global Accelerator. Otherwise, you cannot configure the endpoint. You can click Cross-border product compliance inspection as prompted. In the Enable Cross-border Acceleration dialog box, read the Compliance Commitments Regarding Cross-border Data Transfers, select Agree to the Preceding Compliance Agreement, and then click Enable. Then, the configurations of the listener will be modified.
After you complete the configurations, the Transmission Network Type of your Global Accelerator instance is BGP (Multi-ISP) Pro by default. You can accelerate content delivery in a cost-effective manner between regions in the Chinese mainland and regions outside the Chinese mainland, including China (Hong Kong), China (Macao), and China (Taiwan). No additional configurations are required. For more information, see Pay-by-data-transfer.
NoteThe first time you add a listener, the listener takes effect after 3 minutes. If you modify the configurations of a listener, the new configurations take effect after 1 minute.
Add an HTTP or HTTPS listener
Configure the listener and protocol.
Log on to the GA console.
On the Instances page, find the GA instance that you want to manage and click Configure Listeners in the Actions column.
On the Listeners tab, click Add Listener.
NoteThe first time that you add a listener or if the specified Global Accelerator instance is not configured with a listener, skip this step.
On the Configure Listener & Protocol wizard page, configure parameters and click Next. The following table describes the parameters.
Parameter
Description
Listener Name
Enter a name for the listener.
Routing Type
Select a route type. In this topic, Intelligent Routing is selected.
Intelligent Routing: automatically selects a nearby and healthy endpoint group based on network latency and forwards client requests to the optimal endpoint in the endpoint group.
Custom Routing: generates a port mapping table based on the listener port range, the port ranges of the destination endpoint groups, and the IP addresses of endpoints (vSwitches). This way, traffic is routed to the specific IP addresses and ports of specified vSwitches. For more information about how to configure a custom routing listener, see Add and manage custom routing listeners.
NoteCustom routing listeners are in invitational preview. To use custom routing listeners, submit an application to your account manager. After your application is approved, you can use custom routing listeners.
Protocol
Select a network transmission protocol for the listener. Valid values:
HTTPS: HTTPS has the following features:
A connection-oriented protocol that provides high reliability. Before data can be transmitted, you must establish a logical connection.
To ensure the high reliability of data, you can bind SSL certificates to servers.
Data transmission is encrypted.
HTTP: HTTP has the following features:
A connection-oriented protocol that provides high reliability. Before data can be transmitted, you must establish a logical connection.
Data is transmitted at a high rate.
Data transmission is not encrypted.
Port Number
Specify the listener port. The listener port is used to receive requests and forward requests to endpoints. Valid values: 1 to 65499.
You can configure only one listener port for each HTTP or HTTPS listener.
Client Affinity
Specify whether to enable client affinity.
If you select Source IP Address from the drop-down list, client affinity is enabled. In this case, requests from a client IP address are forwarded to the same endpoint.
If you select Disabled from the drop-down list, client affinity is disabled. In this case, requests from a client IP address may be forwarded to different endpoints.
Advanced Settings
Click Modify and select a value for Add HTTP Header Field.
Use the
GA-ID
header to obtain the ID of the GA instance.Use the
GA-AP
header to retrieve the acceleration region of the GA instance.Use the
GA-X-Forwarded-Proto
header to retrieve the listener protocol of the GA instance.Use the
GA-X-Forwarded-Port
header to retrieve the listener port of the GA instance.Use the
X-Real-IP
header to retrieve client IP addresses.
On the Configure SSL Certificate wizard page, select an SSL certificate and click Next.
You are required to configure an SSL certificate only if you add an HTTPS listener. SSL certificates ensure that data transmission over GA is encrypted.
On the Server Certificate wizard page, select the SSL certificate that you purchased.
Click Advanced Settings to the right of Modify and select a Transport Layer Security (TLS) security policy from the TLS Security Policies drop-down list.
For more information about TLS security policies, see TLS security policies.
Click Next.
Configure endpoints.
Each listener is associated with an endpoint group. You can specify the region to which you want to forward network traffic to associate an endpoint group with a listener. After you associate an endpoint group with a listener, traffic is forwarded to the optimal endpoint in the associated endpoint group.
On the Configure Endpoint Group wizard page, configure parameters and click Next. The following table describes the parameters.
This topic describes only how to configure endpoints and endpoint groups. For information about health checks, see Create a default endpoint group. For more information about endpoints and endpoint groups, see Overview.
Parameter
Description
Endpoint Group Name
Enter a name for the endpoint group.
Region
Select the region where you want to deploy the endpoint group.
Backend Service
Specify whether backend servers are deployed on Alibaba Cloud.
- Alibaba Cloud: Backend servers are deployed on Alibaba Cloud.
- Off Alibaba Cloud: Backend servers are not deployed on Alibaba Cloud.
Preserve Client IP
Specify whether to preserve client IP addresses.
By default, client IP address preservation is enabled for HTTP and HTTPS listeners. GA preserves the IP address of a client in the
X-Forwarded-For
HTTP header. For more information, see Preserve client IP addresses.Endpoint
Endpoints are the destinations of client requests. To add an endpoint, configure the following parameters:
- Backend Service Type: If your backend server is deployed on Alibaba Cloud, you can select Alibaba Cloud Public IP Address, ECS, CLB, ALB, or OSS. If your backend server is not deployed on Alibaba Cloud, you can select Custom IP Address or Custom Domain Name. Note
- By default, you cannot specify Elastic Compute Service (ECS) instances in virtual private clouds (VPCs), internal-facing Classic Load Balancer (CLB) instances, or internal-facing Application Load Balancer (ALB) instances as endpoints for standard GA instances. To specify these instances as endpoints, contact your account manager.
- The IP addresses of endpoints associated with each GA instance must be globally unique and cannot be duplicates of other GA instances.
- If no service-linked role exists when you specify Elastic Compute Service (ECS) instances, Classic Load Balancer (CLB) instances, Application Load Balancer (ALB) instances, or Object Storage Service (OSS) buckets as endpoints, the system automatically creates the corresponding service-linked role. For more information, see AliyunServiceRoleForGaVpcEndpoint, AliyunServiceRoleForGaAlb, and AliyunServiceRoleForGaOss.
- Backend Service: Enter the IP address, domain name, or instance ID of the backend server.
- Weight: Specify a weight for the endpoint. Valid values: 0 to 255. GA distributes network traffic to endpoints based on their weights. Warning
If the weight of an endpoint is set to 0, GA stops distributing network traffic to the endpoint. Proceed with caution.
You can click + Add Endpoint to add more endpoints. You can create up to four endpoints for each endpoint group.
Backend Service Protocol
Select the protocol that is used by the backend server. Valid values:
HTTP (default)
HTTPS
Note- If the listener protocol is HTTP, this parameter is set to HTTP by default and cannot be modified.
- You can set the Backend Service Protocol parameter only when you configure an endpoint group for an HTTP or HTTPS listener.
Port Mapping
If the listener port and the port that is used by the endpoint to provide services are different, you must add a port mapping.
- Listener Port: Enter the listener port.
- Endpoint Port: Enter the port over which the endpoint provides services.
If the listener port and the port that is used by the endpoint to provide services are the same, you do not need to add a port mapping. Global Accelerator automatically forwards client requests to the listener port of the endpoint.
Note You can set the Port Mapping parameter only when you configure an endpoint group for an HTTP or HTTPS listener.Confirm the configurations.
On the Confirm wizard page, confirm the configurations of the listener and the endpoints, and then click Submit.
If you want to modify a setting, click Modify that corresponds to the setting. Then, you are redirected to the configuration page.
If the bandwidth metering method of your Global Accelerator instance is pay-by-data-transfer and your business involves cross-border acceleration between the Chinese mainland and regions outside the Chinese mainland, including China (Hong Kong), China (Macao), and China (Taiwan), you must enable cross-border acceleration for your Global Accelerator. Otherwise, you cannot configure the endpoint. You can click Cross-border product compliance inspection as prompted. In the Enable Cross-border Acceleration dialog box, read the Compliance Commitments Regarding Cross-border Data Transfers, select Agree to the Preceding Compliance Agreement, and then click Enable. Then, the configurations of the listener will be modified.
After you complete the configurations, the Transmission Network Type of your Global Accelerator instance is BGP (Multi-ISP) Pro by default. You can accelerate content delivery in a cost-effective manner between regions in the Chinese mainland and regions outside the Chinese mainland, including China (Hong Kong), China (Macao), and China (Taiwan). No additional configurations are required. For more information, see Pay-by-data-transfer.
NoteThe first time you add a listener, the listener takes effect after 3 minutes. If you modify the configurations of a listener, the new configurations take effect after 1 minute.
Related operations
Operation | Description |
Modify a listener | You can modify a listener to meet your business requirements. The configurations that you can modify include the basic settings, protocol, SSL certificate, and endpoint group of the listener. You cannot change the routing type of a listener.
|
Delete a listener | You can delete a listener. After you delete a listener, the endpoint group that is associated with the listener is also deleted.
|
Configure virtual endpoint groups and forwarding rules for an HTTP or HTTPS listener | After you add an HTTP or HTTPS listener, you can configure virtual endpoint groups and forwarding rules for the listener. Then, GA can simultaneously accelerate multiple domain names or paths to access your backend HTTP or HTTPS services. For more information, see the following topics: |
References
CreateListener: creates a listener for a GA instance.
UpdateListener: modifies a specified listener of a GA instance.
DeleteListener: deletes a specified listener of a GA instance.