Listener overview
This topic provides an overview of listeners. After you create a Server Load Balancer( SLB) instance, you must configure one or more listeners for the SLB instance. A listener checks for connection requests and then distributes the requests to backend servers based on the forwarding rules that are defined by a specified scheduling algorithm.
SLB provides TCP and UDP listeners for Layer 4 load balancing, and HTTP and HTTPS listeners for Layer 7 load balancing. The following table describes the features and use scenarios of these listeners.
Protocol | Description | Scenario |
---|---|---|
TCP | · A connection-oriented protocol. A reliable connection must be established before data can be sent and received. · Session persistence is based on source IP addresses. · Source IP addresses are visible at the network layer. · Data is transmitted at a fast rate. | · Applicable to scenarios that require high reliability and data accuracy but can tolerate low speeds, such as file transmission, sending or receiving emails, and remote logons. · Web applications that do not have custom requirements. |
UDP | · A connectionless protocol. UDP transmits data packets directly instead of making a three-way handshake with the other party before UDP sends data. UDP does not provide error recovery or data re-transmission. · Fast data transmission but relatively low reliability. | Applicable to scenarios where real-time transmission is more important than reliability, such as video chats and real-time financial market pushes. |
HTTP | · An application-layer protocol that is used to package data. · Cookie-based session persistence. · Use the X-Forward-For header to obtain the real IP addresses of clients. | Applicable to scenarios that require data content identification, such as web applications and small mobile games. |
HTTPS | · Encrypted data transmission that prevents unauthorized access. · Centralized certificate management service. You can upload certificates to CLB. The decryption operations are completed directly on CLB. | Applicable to scenarios that require encrypted transmission. |