All Products
Search
Document Center

Server Load Balancer:CLB listeners

Last Updated:Dec 16, 2024

This topic provides an overview of listeners. After you create a Classic Load Balancer (CLB) instance, you must configure at least one listener for the CLB instance. Listeners define how requests are forwarded to backend servers. Listeners listen for connection requests and forward the requests to backend servers based on the scheduling algorithms specified in forwarding rules. CLB listeners support the following protocols: TCP, UDP, HTTP, and HTTPS.

Supported listeners and use scenarios

CLB supports Layer 4 and Layer 7 listeners. Layer 4 listeners use the TCP or UDP protocol, and Layer 7 listeners use the HTTP or HTTPS protocol. Choose a type of listener based on your business requirements.

Type

Protocol

Description

Scenario

Layer 4 listener

TCP

  • TCP is a connection-oriented protocol that requires a logical connection to be established before data can be transmitted.

  • TCP supports reliable data transmission but a relatively lower transmission speed.

  • Scenarios that require high data consistency and data integrity but can tolerate a relatively lower transmission speed, such as file transmission, email services, and remote logon.

  • Web applications that do not have custom requirements.

For more information, see Add a TCP listener.

UDP

  • UDP supports direct data transmission without three-way handshakes or connections. However, UDP does not support error correction or retransmission.

  • UDP supports quicker data transmission and relatively lower reliability.

Scenarios that require high time efficiency but can tolerate relatively lower reliability, such as video conferencing and real-time push of financial news and information.

For more information, see Add a UDP listener.

Layer 7 listener

HTTP

  • HTTP is an application-layer protocol that is used to package data.

  • HTTP supports cookie-based session persistence.

  • HTTP uses the X-Forwarded-For header to preserve client IP addresses.

Applications that need to identify data content, such as web applications and mobile games.

For more information, see Add an HTTP listener.

HTTPS

  • HTTPS encrypts data transmission to prevent unauthorized access.

  • HTTPS supports centralized certificate management. You can upload certificates to CLB. Then, data decryption is offloaded from backend servers to CLB.

HTTP applications that require encrypted transmission.

For more information, see Add an HTTPS listener.

References

CLB supports basic load balancing at Layer 4 and Layer 7. CLB listeners support the TCP, UDP, HTTP, and HTTPS protocols.

Alibaba Cloud has released a next-generation Layer 7 load balancer Application Load Balancer (ALB), and a next-generation Layer 4 load balancer Network Load Balancer (NLB). The next-generation load balancers support higher performance than CLB. ALB supports load balancing at Layer 7, advanced forwarding rules, and the QUIC protocol. NLB supports higher performance than CLB, and supports automatic scaling. We recommend that you use ALB and NLB.