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
- Log on to the CLB console.
- On the Instances page, select the region where the CLB instance that you want to manage is deployed.
- Find and click the CLB instance that you want to manage.
- On the VServer Groups tab, click Create VServer Group.
- On the Create VServer Group page, set the parameters and click Create.
Modify a vServer group
After you create a vServer group, you can modify the configurations of ECS instances in the vServer group.
- Log on to the CLB console.
- On the Instances page, select the region where the CLB instance that you want to manage is deployed.
- Find and click the CLB instance that you want to manage.
- Click the VServer Groups tab.
- Find the ECS instance that you want to manage and click Edit in the Actions column.
- 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.
- Log on to the CLB console.
- On the Instances page, select the region where the CLB instance that you want to manage is deployed.
- Find and click the CLB instance that you want to manage.
- Click the VServer Groups tab.
- 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.
- In the message that appears, click OK.
References
- CreateVServerGroup: creates a vServer group and adds ECS instances to the vServer group.
- SetVServerGroupAttribute: modifies the configurations of a vServer group. This operation modifies only the weights and names of the ECS instances.
- AddVServerGroupBackendServers: adds ECS instances to a vServer group.
- RemoveVServerGroupBackendServers: removes ECS instances from a vServer group.
- ModifyVServerGroupBackendServers: replaces the ECS instances in a vServer group.
- DeleteVServerGroup: deletes a vServer group.
- DescribeVServerGroups: queries vServer groups.
- DescribeVServerGroupAttribute: queries the detailed information about a vServer group.