A CLB listener checks for incoming connection requests and distributes them to backend servers based on configured scheduling algorithms and forwarding rules. Each CLB instance requires at least one listener. CLB supports TCP, UDP, HTTP, and HTTPS listeners.
Listener types and scenarios
CLB supports Layer 4 listeners (TCP and UDP) and Layer 7 listeners (HTTP and HTTPS). Choose a listener type based on your requirements.
|
Type |
Protocol |
Description |
Scenario |
|
Layer 4 listener |
TCP |
|
For more information, see Add a TCP listener. |
|
UDP |
|
Scenarios that prioritize speed over reliability, such as video conferencing and real-time financial data feeds. For more information, see Add a UDP listener. |
|
|
Layer 7 listener |
HTTP |
|
Applications that need to identify data content, such as web applications and mobile games. For more information, see Add an HTTP listener. |
|
HTTPS |
|
Applications that require encrypted data transmission. For more information, see Add an HTTPS listener. |
Port configuration limitations
|
Port |
Description |
Limitations |
|
Listener port (front-end port) |
Receives client requests. |
For a CLB instance:
|
|
Server port (backend port) |
The port on which backend servers provide services. |
For a CLB instance:
Note
|
Listener feature comparison
|
Feature |
Layer 4 listener |
Layer 7 listener |
||
|
TCP listener |
UDP listener |
HTTP listener |
HTTPS listener |
|
|
Backend protocol |
TCP |
UDP |
HTTP |
HTTP |
|
Scheduling algorithm |
|
|
|
|
|
Certificate |
Not applicable. Deploy SSL certificates on backend servers if needed. |
Not applicable |
Not applicable |
Add certificates to CLB. |
|
Access logs |
Not supported |
Not supported |
Supported |
Supported |
|
Second-level monitoring |
Supported |
Supported |
Not supported |
Not supported |
|
Primary/secondary server group |
Supported |
Supported |
Not supported |
Not supported |
|
Forwarding rule |
Not supported. Configure forwarding rules on backend servers if needed. |
Supported. Configure forwarding rules for listeners. |
||
Specific regions do not support Layer 7 listeners. For details, see CLB regions and zones.
Bandwidth sharing among listeners
CLB instances have limited bandwidth. You can allocate exclusive bandwidth to listeners for critical services and let the remaining listeners share the rest. This improves stability and availability for key services.
How it works
Assume a CLB instance has 10 Mbit/s bandwidth with three listeners: A, B, and C. Listener A has an exclusive bandwidth of 4 Mbit/s:
-
Listener A always has 4 Mbit/s available, regardless of traffic on listeners B and C.
-
Listeners B and C share the remaining 6 Mbit/s bandwidth (10 Mbit/s - 4 Mbit/s).
-
If listener B has no traffic, listener C can use the full 6 Mbit/s, and vice versa.
-
If both receive traffic, the 6 Mbit/s is split proportionally. For example, equal traffic gives each listener roughly 3 Mbit/s.
-
If one listener uses all 6 Mbit/s, the other receives no bandwidth, causing packet loss.
-
-
No packet loss occurs as long as each listener's traffic stays within its allocated bandwidth.
If your CLB service cannot reach the maximum bandwidth you specified when purchasing the instance, refer to Failure to reach peak bandwidth
Enable bandwidth throttling for a listener
When you create a listener, go to the Protocol & Listener step, click Modify next to Advanced Settings, and enable Bandwidth Throttling for Listeners.
-
If enabled, specify an exclusive bandwidth for the listener. The value must not exceed the instance's maximum bandwidth minus the bandwidth allocated to other listeners.
NoteAll forwarding policies on the listener share its exclusive bandwidth.
-
If disabled, the listener shares the remaining instance bandwidth with all other non-exclusive listeners.
References
CLB provides basic Layer 4 (TCP/UDP) and Layer 7 (HTTP/HTTPS) load balancing.
Alibaba Cloud also offers Application Load Balancer (ALB) for Layer 7 with advanced forwarding and QUIC support, and Network Load Balancer (NLB) for Layer 4 with higher performance and auto scaling. ALB and NLB are recommended over CLB.
-
For more information about the Server Load Balancer (SLB) family, see SLB product family
-
For more information about ALB and NLB, see Application Load Balancer (ALB) and What is NLB?