This topic answers common questions about listeners.
Does Global Accelerator support client IP address preservation?
Do UDP listeners support client affinity and client IP address preservation?
Can different listeners of the same Global Accelerator instance use the same port?
What is the maximum number of listeners per Global Accelerator instance?
Why does client IP address preservation not work after it is enabled?
What do I do if access errors occur when I use a TCP listener to accelerate HTTPS services?
Client IP address preservation support
Yes.
Global Accelerator (GA) support for client IP address preservation depends on the listener protocol. For more information, see Client IP address preservation.
Client affinity and IP preservation on UDP listeners
Yes.
You can configure client affinity when you create a GA instance or add a UDP listener to an existing GA instance.
You can enable client IP address preservation for a UDP listener when you configure an endpoint group.
Shared ports for different listeners
UDP listeners can share a port with TCP, HTTP, or HTTPS listeners. TCP, HTTP, and HTTPS listeners cannot share a port with each other.
Maximum listeners per instance
50.
You can increase quotas in Quota Center or on the Quota Management page. For more information, see Increase a quota.
For more information about the limits of Global Accelerator, see Limits.
Maximum ports per listener
The default maximum number of ports depends on the listener's routing type and protocol:
Intelligent routing listeners:
For each TCP or UDP listener: 30.
NoteFor more information about how to calculate the number of ports, see Intelligent routing listener ports.
For each HTTP or HTTPS listener: 1.
Custom routing listeners: 65499.
For TCP or UDP listeners that use intelligent routing, the maximum number of ports per listener also varies by the billing method of the GA instance. For more information, see Listener ports.
Supported listener port range
The supported port range for a listener is 1 to 65,499.
Troubleshoot client IP preservation failure
For an HTTP or HTTPS listener, client IP address preservation does not work if the backend server cannot record or process the
X-Forwarded-Forheader.For a TCP listener:
If your backend service is deployed on Alibaba Cloud, client IP address preservation does not work if the backend instance, or the instance associated with the Elastic IP Address (EIP), is not in a VPC.
If your backend service is deployed outside Alibaba Cloud, the backend server must support Proxy Protocol to retrieve the client IP address. Otherwise, this feature does not work.
When client IP address preservation is enabled, Global Accelerator uses Proxy Protocol to forward the client IP address. If your backend server does not support Proxy Protocol, it cannot correctly parse the accelerated traffic.
If an IPv6 client accesses an IPv4 backend service, the backend server must support Proxy Protocol to retrieve the client IP address. Otherwise, this feature does not work.
For a UDP listener, client IP address preservation does not work if an IPv6 client accesses an IPv4 backend service.
For more information about how client IP address preservation works for different listener protocols, see Client IP address preservation.
Disable client IP preservation
For HTTP and HTTPS listeners, client IP address preservation is enabled by default and cannot be disabled.
For TCP and UDP listeners, you can disable this feature in the console by following these steps:
On the Instances page, find the target Global Accelerator instance and click Configure Listener in the Actions column.
On the Listeners tab, find the target listener and click Edit in the Actions column.
In the Configure Listener & Protocol step, click Next.
In the Configure Endpoint Group step, set Preserve Client IP to Do Not Preserve, and then click Next.
In the Configuration Review step, review the settings and click Submit.
Retrieve client IPs in IPv6-to-IPv4 traffic
For an HTTP or HTTPS listener, the client IP address for both IPv4 and IPv6 clients is available only in the
X-Forwarded-Forfield of the HTTP request header.For a TCP listener, only Proxy Protocol is supported for retrieving the IP addresses of IPv6 clients. With this method, the backend server must support Proxy Protocol to retrieve the client IP address. Otherwise, access may fail.
For UDP listeners, retrieving the IP addresses of IPv6 clients is not supported.
For more information about how to retrieve client IP addresses, see Client IP address preservation.
Access errors using TCP listeners for HTTPS
We recommend that you use an HTTPS listener for HTTPS services. A TCP listener provides Layer 4 forwarding and cannot manage TLS certificates or handle HTTP layer routing. This can cause errors in some backend scenarios, such as when a custom domain name is mapped to an object storage service.