All Products
Search
Document Center

Server Load Balancer:Add an ECS instance to the default server group

Last Updated:Sep 26, 2023

Each Classic Load Balancer (CLB) instance is associated with a default server group. You can add Elastic Compute Service (ECS) instances to the default server group. All listeners on the CLB instance are associated with the default server group. This topic describes how to add an ECS instance to a default server group and manage ECS instances in the default server group.

Prerequisites

Before you add an ECS instance to the default server group, make sure that the following requirements are met:

  • A CLB instance is created. For more information, see Create and manage CLB instances.

  • ECS instances are created and applications are deployed on the ECS instances to receive requests. For more information, see the following topics:

    Important

    Make sure that the ECS instances and the CLB instance are deployed in the same region.

Add an ECS instance to the default server group

  1. Log on to the CLB console.
  2. In the top navigation bar, select the region where the CLB instance is deployed.

  3. On the Instances page, click the ID of the CLB instance that you want to manage.

  4. Click the Default Server Group tab and click Add.

  5. In the Servers panel, select an ECS instance and click Next.

    If you want to select an elastic network interface (ENI), make sure that the ENI is attached to the ECS instance. For more information, see Add backend servers by specifying ENIs.

  1. In the Ports/Weights step, specify a weight for the ECS instance and click Add.

    An ECS instance with a higher weight receives more requests. You can click 批量操作 to specify the ports and weights of multiple ECS instances.

    • Replicate to Below: The weights of all backend servers below the current server are set to the weight of the current server.

    • Replicate to Above: The weights of all backend servers above the current server are set to the weight of the current server.

    • Replicate to All: The weights of all backend servers in the default server group are set to the weight of the current server.

    • Reset: If you click Reset on the right side of Weight, the weights of all ECS instances in the server group are set to the default value.

    Important

    Valid values: 0 to 100. If the weight of a backend server is set to 0, no requests are sent to the backend server.

  1. In the Servers to Add panel, confirm the configurations and click OK. In the message that appears, click OK.

    You can click Add More in the Servers to Add panel to add more ECS instances.

Manage the ECS instances in the default server group

After you add ECS instances to the default server group, you can modify the weights of the ECS instances. If you no longer use an ECS instance, you can remove the ECS instance from the default server group.

  1. Log on to the CLB console.
  2. In the top navigation bar, select the region where the CLB instance is deployed.

  3. On the Instances page, click the ID of the CLB instance that you want to manage.

  4. Click the Default Server Group tab. On this tab, you can manage the ECS instances.

    • Modify the weights of the ECS instances:

      1. Find the backend server that you want to manage, move the pointer over the weight specified for the backend server, and then click the 铅笔 icon.

      2. In the dialog box that appears, enter a weight for the ECS instance and click OK.

        Important

        Valid values: 0 to 100. If the weight of a backend server is set to 0, no requests are sent to the backend server.

    • Remove an ECS instance:

      1. Find the ECS instance that you want to remove and click Remove in the Operations column.

      2. In the OK message, click Remove.

References