This topic describes how to configure a CLB instance. Before you can configure a Classic Load Balancer (CLB) instance to forward traffic, you must add at least one listener and one group of backend servers to the CLB instance. The following example describes how to add a TCP listener and two Elastic Compute Service (ECS) instances to a CLB instance. The ECS instances are named ECS 01 and ECS 02. The ECS instances function as backend servers and host static web pages.


  1. Log on to the CLB console.
  2. On the Instances page, find the CLB instance that you want to manage and click Configure Listener in the Actions column.
  3. On the Protocol and Listener wizard page, set the following parameters to configure the listener. Use the default settings for other parameters.
    Parameter Description
    Select Listener Protocol Select a protocol for the listener.

    In this example, TCP is selected.

    Listening Port Specify the port that the CLB instance uses to receive requests and forward the requests to backend servers. In this example, the port number is set to 80.
    Note The ports on which a CLB instance listens must be unique.
    Listener Name Enter a name for the listener. By default, the system sets the parameter to protocol_port if you do not specify this parameter.
    Scheduling Algorithm Select the scheduling algorithm. In this example, Round-Robin (RR) is selected.
    • Weighted Round-Robin (WRR): Requests are distributed to backend servers in sequence. A backend servers that has a higher weight receives more requests.
    • Round-Robin (RR): Requests are distributed to backend servers in sequence.
    • Consistent Hash (CH): Only high-performance CLB instances support the CH algorithm.
    Enable Session Persistence After you enable session persistence, requests from the same IP address are forwarded to the same backend server.
    Enable Access Control After you enable access control, you can configure a whitelist to allow access from specified IP addresses, or a blacklist to deny access from specified IP addresses.
    Enable Peak Bandwidth Limit You can select different bandwidth limits to define the service capability of applications on a backend ECS instance.

    In this example, the CLB instance has unlimited bandwidth and is billed on a pay-by-data-transfer basis. Therefore, this parameter is not set.

    Idle Timeout Specify the timeout period of idle connections. If no response is received through a connection within the specified timeout period, CLB automatically closes the connection. Value values: 10 to 900. Unit: seconds.
    Proxy Protocol Specify whether to use the proxy protocol to forward client IP addresses or VPC IDs to backend servers.
    Obtain Client Source IP Address By default, this feature is enabled.
  4. Click Next to configure backend servers. In this example, the default server group is used.
  5. On the Backend Servers wizard page, select Default Server Group and click Add More to add backend servers.
    1. In the My Servers panel, select ECS 01 and ECS 02 that you created, and click Next.
    2. A backend server that has a higher weight receives more requests. The default value is 100. We recommend that you use the default value.
    3. Click Add.
    4. On the Default Server Group tab, specify backend ports that are available to receive requests. The ports are used by backend ECS instances to receive requests. You can specify the same port for multiple backend servers that are added to the same CLB instance. In this example, the port number is set to 80.
  6. Click Next to configure health checks. In this example, the default health check settings are used.

    After you enable health checks for the CLB instance, the CLB instance periodically checks whether the backend ECS instances are healthy. When the CLB instance detects an unhealthy ECS instance, the CLB instance distributes the requests to other healthy ECS instances. When the unhealthy ECS instance recovers, the CLB instance starts to distribute requests to the ECS instance again.

  7. Click Next. On the Confirm wizard page, check the configurations and click Submit.
  8. Click OK to go back to the Instances page.
    If the health check status of a backend ECS instance is Active, the backend server can process requests as normal.
  9. Enter the service address of the CLB instance into the address bar of the browser to check the connectivity. We recommend that you run the test multiple times.
    Figure 1. ECS01
    Figure 2. ECS02