All Products
Document Center

Server Load Balancer:Configure a CLB instance

Last Updated:Sep 12, 2023

This topic describes how to configure a Classic Load Balancer (CLB) instance. Before a CLB instance can forward traffic, you must add at least one listener and one group of backend servers to the CLB instance. The following example shows how to add a TCP listener and Elastic Compute Service (ECS) instances to a CLB instance. The ECS instances named ECS01 and ECS02 serve as backend servers that 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. In the Protocol and Listener step, configure the following parameters. Use the default settings for other parameters. Click Next.

    1. Select Listener Protocol: Select a listener protocol. TCP is selected in this example.

    2. Listening Port: Specify the frontend port that is used to receive and distribute requests to backend servers. In this example, the port number is set to 80.

    3. Listener Name: Enter a name for the listener.

    4. Advanced: Click Modify to configure the advanced settings. In this example, the default settings are used.

  4. In the Backend Servers step, select Default Server Group and click Add More to add backend servers.

    1. In the Servers panel, select ECS01 and ECS02 and click Next.

    2. Configure weights for the backend servers. A backend server with 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 the backend ports that 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.

  5. 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 requests to healthy ECS instances. When the unhealthy ECS instance recovers, the CLB instance distributes requests to the ECS instance again.

  6. Click Next. In the Confirm step, check the configurations and click Submit.

  7. Click OK to return to the Instances page. Then, click .

    If the health check status is Normal, the backend ECS instances can process requests forwarded by CLB.

  8. Enter the IP address of the CLB instance in the address bar of a browser to test the load balancing service. The results show that requests are distributed to ECS01 and ECS02. If one of the backend servers fails, the other backend server can take over to ensure business continuity.