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 added to a vServer group must be in 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:
  • A CLB instance is created. For more information, see Create and manage a CLB instance.
  • ECS instances are created and applications are deployed on the ECS instances to receive requests.

Create a vServer group

  1. Log on to the CLB console.
  2. On the Instances page, select the region where the CLB instance that you want to manage is deployed.
  3. Find and click the CLB instance that you want to manage.
  4. On the VServer Groups tab, click Create VServer Group.
  5. On the Create VServer Group page, set the parameters and click Create.
    1. In the VServer Group Name field, enter a name for the vServer group.
    2. In the Servers Added section, click Add.
    3. In the Servers panel, select the ECS instances that you want to add and click Next.
    4. On the Ports/Weights page, enter a port and a weight for each ECS instance and click Add.
      • Port: Specify the backend port that the ECS instance uses to receive requests.

        On the same CLB instance, ECS instances 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 Batch operation to specify ports and weights for all ECS instances in the vServer group.

      • Replicate to Below: The ports or weights of all ECS instances below the current ECS instance are set to the port or weight of the current server.
      • Replicate to Above: The ports or weights of all ECS instances above the current server are set to the port or weight of the current ECS instance.
      • Replicate to All: The ports or weights of all ECS instances in the vServer group are set to the port or weight of the current ECS instance.
      • Reset:
        • Reset on the right side of Port: The ports of all ECS instances in the vServer group are cleared.
        • Reset on the right side of Weight: The weights of all ECS instances in the vServer group are set to the default value.

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 that you want to manage is deployed.
  3. Find and click the CLB instance that you want to manage.
  4. Click the VServer Groups tab.
  5. Find the ECS instance that you want to manage and click Edit in the Actions column.
  6. On the Edit VServer Group page, modify the configurations of the ECS instance 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.
    • You can click Add More to go to the Servers page to add 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 that you want to manage 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