After creating a classic CLB instance, you need to configure a listener for it. The listener listens to requests on the instance and distributes traffic to real servers based on the load balancing policy.
You need to create a CLB instance first and select "Classic CLB" for Instance type.
Note:Currently, there are two types of Tencent Cloud accounts: bill-by-EIP/CLB and bill-by-CVM. All Tencent Cloud accounts registered after June 17, 2020 00:00:00 are bill-by-EIP/CLB accounts. For Tencent Cloud accounts registered before June 17, 2020, check your account types in the console. Bill-by-EIP/CLB accounts no longer support classic CLB. You can now only purchase a CLB instance.
Click Create under Listener Management and configure a TCP listener in the pop-up window.
Configuration Item | Description | Example |
---|---|---|
Name | Listener name. | test-tcp-80&dxnbsp;&dxnbsp;&dxnbsp;&dxnbsp; |
Listener Protocol Ports | Listener protocol and listening port |
TCP:80 |
Backend Port | The port through which the CVM instance provides services, receives and processes traffic from a CLB instance. | 80 |
To create a TCP listener, complete the basic configuration as shown below:
Configuration Item | Description | Example |
---|---|---|
Balance Method | For TCP listeners, CLB supports two scheduling algorithms: weighted round robin (WRR) and weighted least-connection (WLC). |
WRR |
Session Persistence | Whether to enable or disable session persistence. |
Enabled |
Hold Time | Session persistence time. |
30s |
Complete the configuration as shown below:
Configuration Item | Description | Example |
---|---|---|
Health Check | Whether to enable or disable health check. In TCP listeners, CLB instances send SYN packets to specified server ports to perform health checks. | Enabled |
Check Protocol | To be added. | To be added |
Check Port | To be added. | To be added |
Response Timeout | 2s | |
Check Interval | 5s | |
Unhealthy Threshold | failure for n consecutive times (n is user-defined), the real server is unhealthy and the unhealthy status is displayed in the console. |
3 times |
Healthy Threshold | success for n consecutive times (n is user-defined), the real server is healthy and the healthy status is displayed in the console. |
3 times |
Complete the health check configuration as shown below:
Click Bind on the Listener Management page and select the real server to be bound in the pop-up window, as shown below:
The configuration is as shown below:
Note:If you configure multiple listeners to a classic CLB instance and bind multiple real servers, each listener will forward requests to all real servers based on its configuration.
You can configure a CLB security group to isolate public network traffic. For more information, see Configuring a CLB Security Group.
If you need to modify or delete an existing listener, select the listener on the Listener Management page and click Modify or Delete.
Was this page helpful?