This topic provides an overview of listeners. After you create a Classic Load Balancer (CLB) instance, you must configure one or more listeners for it. 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.

CLB provides Layer 4 (TCP or UDP) and Layer 7 (HTTP or HTTPS) listeners. The following table lists the features and use cases of these listeners.

  • 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.

For more information, see Add a TCP listener.

  • 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.

For more information, see Add a UDP listener.

  • An application-layer protocol that is used to package data.
  • Cookie-based session persistence.
  • Retrieve client IP addresses by using the X-Forwarded-For header.

Applicable to scenarios that require data content identification, such as web applications and small mobile games.

For more information, see Add an HTTP listener.

  • 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.

For more information, see Add an HTTPS listener.