After a Cloud Load Balancer (CLB) instance is created, you must configure a listener for it. The listener listens to incoming requests to the CLB instance and then routes them to Cloud Virtual Machine (CVM) instances according to the configured load balancing policy.
You must configure the following items when configuring a listener for a CLB instance:
A CLB listener listens to incoming layer-4 and layer-7 requests to a CLB instance and routes them to CVM instances for processing. You can configure a layer-4 or layer-7 listener depending on whether you route requests for load balancing over a layer-4 or layer-7 protocol.
Tencent Cloud CLB supports request forwarding over the following protocols:
- The TCP SSL listener feature is currently in beta test. To try it out, please submit a ticket for application.
- The TCP SSL listener feature is only available to public network CLB but not private network CLB or classic CLB.
|TCP||Connection-oriented and reliable transport layer protocol
||TCP is suitable for scenarios where high transfer reliability and data accuracy are required with a slight compromise on transfer speed. Typical scenarios include file transfer, sending and receiving emails, and remote logins.
For more information, please see Configuring a TCP Listener.
|UDP||Connectionless transport layer protocol
||UDP is suitable for scenarios where a high transfer speed is preferred over accuracy. Typical scenarios include instant messaging and online videos.
For more information, please see Configuring a UDP Listener.
|TCP SSL||Secure TCP protocol
||TCP SSL is suitable for scenarios where high security is required for TCP and TCP-based custom protocols are supported.
For more information, please see Configuring a TCP SSL Listener.
If you configure a layer-4 listener, the CLB instance establishes a TCP connection with each CVM instance on the listening port and routes requests to CVM instances. During this process, the CLB instance forwards data in passthrough mode in an efficient manner without modifying any data packets.
|HTTP||Application layer protocol
||HTTP is suitable for apps that need to identify request content, such as web apps and app services.
For more information, please see Configuring an HTTP Listener.
|HTTPS||Encrypted application layer protocol
||HTTPS is suitable for HTTP apps that require encrypted transmission.
For more information, please see Configuring an HTTPS Listener.
|Listening port (frontend port)||Service port (backend port)||Description|
|Through the listening port, a CLB instance receives and routes requests to CVM instances for processing.
You can configure a listening port on ports 1–65535, such as port 21 (FTP), port 25 (SMTP), port 80 (HTTP), and port 443 (HTTPS).
|Through the service port, a CVM instance receives and processes requests from a CLB instance.
On a CLB instance, one listening port can route requests to multiple ports of multiple CVM instances.
|Note the following points when configuring a listening port on a CLB instance:
On a CLB instance, you can configure the same service port for different CVM instances. You can also bind different listeners, for example, `HTTP:80` and `HTTPS:443` to the same port of a CVM instance.