After you create a standard Global Accelerator (GA) instance, you need to configure listeners for the GA instance. A listener listens for connection requests and distributes the requests to endpoints based on the routing type of the listener that is associated with the endpoint group.
Listener protocols
You can create up to 10 listeners for each GA instance. The following listener protocols are supported: TCP, UDP, HTTP, and HTTPS. The following table describes the features and use scenarios of the listener protocols.
Protocol | Description | Use scenario |
TCP |
|
|
UDP |
| Applicable to scenarios in which real-time transmission outweighs reliability, such as video conferencing and real-time quote services. |
HTTP |
|
|
HTTPS |
|
|
Routing listeners
GA provides intelligent routing listeners and custom routing listeners. You can select a routing type based on your business requirements.
Custom 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.
Intelligent routing listeners
Intelligent routing is the default routing type of original listeners. After you configure an intelligent routing listener for a GA instance, the GA instance selects a nearby and healthy endpoint group based on network latency and forwards client requests to the optimal endpoint in the endpoint group. The network latency varies based on the geographical location and network hop.
This method is ideal for applications that require fine-grained control of global traffic. You can configure the traffic weights of endpoint groups and endpoints as needed. Examples: blue-green deployment, A/B testing, multi-region deployment, service discontinuation or update in specific regions, and cross-region disaster recovery. For information about the use scenarios and examples, see Distribute traffic across endpoint groups in different scenarios and Examples on how to configure the traffic distribution feature for multiple endpoint groups.
Intelligent routing listeners support TCP, UDP, HTTP, and HTTPS.
Custom routing listeners
After you configure a custom routing listener for a GA instance, the instance generates a port mapping table based on the listener port range, port ranges of the associated endpoint groups, and IP addresses of endpoints (vSwitches). The custom routing listener forwards client requests to specific IP addresses and ports in the vSwitches based on the port mapping table.
Custom routing listeners are suitable for scenarios in which you want to forward traffic from clients to specified backend servers. Examples: multiplayer online games, video conferencing, and virtual classrooms. For information about how custom routing listeners work and how to use custom routing listeners, see How custom routing listeners work.
Custom routing listeners support only TCP and UDP. You can specify protocols when you configure endpoint groups. You can specify TCP, UDP, or both for the destination port range of each endpoint group.
The routing listeners of the same GA instance must be of the same routing type. You cannot change the routing type of a listener after you complete the configuration. For information about the differences between the two types of routing listeners, see the "Comparison between intelligent routing listeners and custom routing listeners" section of the How custom routing listeners work topic.
Listener ports
Listener ports are used to receive requests and forward the requests to endpoints.
Intelligent routing listener ports
The following limits apply to intelligent routing listeners on the same GA instance:
TCP, HTTP, and HTTPS listeners must use different ports.
UDP listeners and HTTP/3 listeners must use different ports.
The following table describes the quotas for the number of ports that are supported by different protocols.
Listener protocol | Listener port range | Port quota |
TCP | 1~65499 | 30.
|
UDP | 1~65499 | 30.
|
HTTP | 1~65499 | 1. |
HTTPS | 1~65499 | 1. |
The following limits apply to TCP or UDP listeners based on the billing method of the GA instance:
Pay-as-you-go
You can specify multiple port ranges that contain consecutive ports for a single listener. Valid ports: 1 to 65499. Make sure that the port ranges do not overlap with each other.
The number of ports supported by a single listener is determined by the value of the gaplus_quota_port_per_listener quota. A quota is consumed by each port or port range.
The number of ports, including ports and port ranges, supported by all listeners on a single GA instance is determined by the value of the gaplus_quota_listener_per_accelerator quota. In other words, the number of ports and port ranges supported by a single GA instance cannot exceed the value of the gaplus_quota_listener_per_accelerator quota.
NoteThe default value of the gaplus_quota_listener_per_accelerator quota is 50. To add more ports or port ranges, request a quota increase from your account manager.
For example, if you specify
1,3-350,400-800
for a TCP listener of your GA instance, three quotas of gaplus_quota_port_per_listener are consumed.In this case, you can add at most 27 ports or port ranges to the TCP listener. If the number of ports or port ranges of the TCP listener reaches 30, you can add at most 20 ports or port ranges to other TCP or UDP listeners on the GA instance.
If you change the port or listener protocol after you configure the listener, data transmission may be interrupted. Proceed with caution. We recommend that you modify the listener configurations during off-peak hours or after you switch network traffic to another GA instance.
Subscription
The number of ports supported by a single listener is determined by the value of the gaplus_quota_port_per_listener quota. Each port consumed one quota.
For example, if you specify
1,3-5
for a TCP listener of your GA instance, four quotas of gaplus_quota_port_per_listener are consumed. In this case, you can add at most 26 ports to the TCP listener.By default, you can specify a port range that contains more than 300 consecutive ports. An advanced listener is a listener that contains more than 300 consecutive listener ports. The following limits apply to advanced listeners:
If you cannot configure a port range that contains more than 300 consecutive ports for a TCP or UDP listener, your GA instance may being using an earlier version. Contact your account manager to upgrade your GA instance.
You must specify more than 300 ports for an advanced listener. The number of ports that you specify must not exceed 65,499.
Each subscription GA instance supports only one advanced listener.
An advanced port range consumes one quota of gaplus_quota_port_per_listener.
Assume that you specify TCP port 1 to port 400, TCP port 443, UDP port 200 to port 210, and UDP port 230 to port 240. Among the port ranges, TCP port 1 to port 400 is an advanced port range.
If you change the port or listener protocol after you configure the listener, data transmission may be interrupted. Proceed with caution. We recommend that you modify the listener configurations during off-peak hours or after you switch network traffic to another GA instance.
Custom routing listener ports
The following limits apply to custom routing listener ports:
Ports in the range of 1 to 65499 can be specified for custom routing listeners. Ports 25, 250, 4789, and 4790 are reserved by the system. When a port mapping table is generated, the system-reserved ports are ignored. Pay-as-you-go GA instances do not support port 6081.
The listener port range that you specify determines the number of ports in the endpoint group that is associated with the listener and the number of IP addresses of all vSwitches in the endpoint. The following requirement must be met:
Number of listening ports (minus the number of system-reserved ports) ≥ Number of all ports in the endpoint group × Number of IP addresses of all vSwitches in the endpoint
. We recommend that you specify a large port range for the listener.For example, if you set the destination port range of endpoint groups to 81-85 and all vSwitches that are used as endpoints provide 16 IP addresses, the listener port range must contain at least 80 ports. You can set the port range of the listener to 101-180. If you set the port range of the listener to 101-179, the listener cannot be created.
After listener ports are configured, you cannot remove ports that exist in the port mapping table when you modify the port range.
For example, the original listening port range is 100-10000, and a mapping is established between port 199 and the destination port 80 of the endpoint in the port mapping table. You can expand the listening port range to 20-10000. You cannot narrow the listening port range to 200-10000.
The ports of the listeners on the same GA instance cannot overlap with each other.