This topic describes how to create a VServer group and then add ECS instances as backend servers to the VServer group. If you associate a VServer group with a listener, the listener distributes requests only to the backend servers in the VServer group instead of other backend servers.

Prerequisites

Before you create a VServer group, make sure that the following conditions are met:
  • An SLB instance is created. For more information, see Create an SLB instance.
  • You have created ECS instances and deployed applications on these ECS instances to process requests.

Background information

Note the following items before you create a VServer group:

  • An ECS instance can be added to multiple VServer groups.
  • A VServer group can be associated with multiple listeners of an SLB instance.
  • The settings of the VServer group include the settings of ECS instances and application ports.

Procedure

  1. Log on to the Server Load Balancer console.
  2. On the Server Load Balancers page, select the region of the target SLB instance.
  3. Find the target SLB instance and click its instance ID.
  4. Click the VServer Groups tab.
  5. On the VServer Groups tab, click Create VServer Group.
  6. On the Create VServer Group page, configure the VServer group.
    1. In the VServer Group Name field, enter a name for the VServer group.
    2. Click Add. In the My Servers dialog box, select ECS instances that you want to add.
    3. Click Next.
    4. Specify a port and a weight for each ECS instance and then click Add.
      Set the ports and weights based on the following information:
      • Port: The backend port opened on an ECS instance to receive requests.

        You can set the same port number for multiple backend servers of the same SLB instance. In addition, you can click Add Port to add multiple ports for a backend server.

      • Weight: An ECS instance with a higher weight receives more requests.
        Notice If the weight of an ECS instance is set to 0, the ECS instance no longer receives new requests.
      You can change the weight of a server and then move the pointer over Batch operations to change the weights of multiple servers:
      • Click Replicate to Below: The weights of all servers below the current server are set to the weight of the current server.
      • Click Replicate to Above: The weights of all servers above the current server are set to the weight of the current server.
      • Click Replicate to All: The weights of all servers in the VServer group are set to the weight of the current server.
      • Click Reset: The weight fields of all servers in the VServer group are cleared.
      Notice If the weight of a backend server is set to 0, this backend server no longer receives new requests.
    5. Click Add.
  7. Click Create.