All Products
Search
Document Center

Server Load Balancer:Create and manage a vServer group

Last Updated:Sep 26, 2023

This topic describes how to create a vServer group for a Classic Load Balancer (CLB) instance. A vServer group contains Elastic Compute Service (ECS) instances that function as backend servers. If you associate a vServer group with a listener, the listener distributes requests only to backend servers in the vServer group.

Background information

Before you create a vServer group, take note of the following items:

  • The ECS instances that you add to a vServer group must be deployed in the same region as the CLB instance.

  • An ECS instance can be added to one or more vServer groups.

  • A vServer group can be associated with one or more listeners of a CLB instance.

  • When you add an ECS instance in a virtual private cloud (VPC) to an Internet-facing CLB instance, make sure that the VPC and the CLB instance are deployed in the same region. When you add multiple ECS instances to an Internet-facing CLB instance, make sure that the ECS instances belong to the same VPC.

  • A vServer group consists of ECS instances and ports.

Prerequisites

Before you create a vServer group, make sure that the following requirements are met:

Create a vServer group

  1. Log on to the CLB console.
  2. On the Instances page, select the region where the CLB instance is deployed.

  3. Find and click the CLB instance that you want to manage.

  4. Click the vServer groups tab and click Create vServer Group.

  5. On the Create vServer Group page, configure the following parameters:

    1. In the vServer Group Name field, enter a name for the vServer group.

    2. Enter a tag key in the Tag Key field and a tag value in the Tag Value field.

    3. In the Selected Servers section, click Add.

  6. 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, enter a port and a weight for each server, and then click Add.

    • Port: Specify the backend port that the ECS instance uses to receive requests.

      ECS instances added to a CLB instance can use the same port.

    • Weight: A server with a higher weight receives more requests.

      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.

    You can click 批量操作 to specify ports and weights for all servers in the vServer group.

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

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

    • Replicate to All: The ports or weights of all servers in the vServer group are set to the port or weight of the current server.

    • Reset:

      • Reset on the right side of Port: The ports of all servers in the vServer group are cleared.

      • Reset on the right side of Weight: The weights of all servers in the vServer group are set to the default value.

  1. Confirm the configurations and click Create. In the message that appears, click OK.

    Note

    Click Add More below Selected Servers to add additional ECS instances.

Modify a vServer group

After you create a vServer group, you can modify the configurations of ECS instances in the vServer group.

  1. Log on to the CLB console.
  2. On the Instances page, select the region where the CLB instance is deployed.

  3. Find and click the CLB instance that you want to manage.

  4. Click the vServer groups tab.

  5. Find the vServer group that you want to manage and click Modify in the Actions column.

  6. On the Modify vServer Group page, modify the information about the vServer group and click Save.

    • You can rename the vServer group.

    • You can modify the ports and weights of the ECS instances in the vServer group.

    • You can click Delete to remove an ECS instance from the vServer group.

      Note

      If the ECS instance is associated with a listener or a forwarding rule, you must disassociate the listener or forwarding rule from the ECS instance before the ECS instance can be removed.

    • Click Add More. In the Servers panel, you can add additional ECS instances to the vServer group.

Delete a vServer group

If you no longer use a vServer group to receive requests, you can delete the vServer group.

  1. Log on to the CLB console.
  2. On the Instances page, select the region where the CLB instance is deployed.

  3. Find and click the CLB instance that you want to manage.

  4. Click the vServer groups tab.

  5. Find the vServer group that you want to delete and click Delete in the Actions column.

    Note

    If the vServer group is associated with a listener or a forwarding rule, you must disassociate the listener or forwarding rule from the vServer group before the vServer group can be deleted.

  6. In the message that appears, click OK.

References