Before you use the Server Load Balancer (SLB) service, you must add at least one default server (ECS instance) to receive client requests forwarded by SLB.

Prerequisites

Before you add ECS instances to the default server group, make sure the following conditions are met:
  • An SLB instance is created. For more information, see Create an SLB instance.
  • ECS instances are created and applications are deployed on the ECS instances to process distributed requests.

Procedure

  1. Log on to the Server Load Balancer console.
  2. On the Server Load Balancer page, select the region of the target SLB instance.
  3. Find the target SLB instance and click the instance ID.
  4. Click the Default Server Group tab.
  5. Click Add.


  6. On the Available Servers page, select the ECS instances you want to add to the default server group.


  7. Click Next: Set Weight and Port.
  8. In the Available Servers dialog box, specify the weights of the ECS instances and click OK.
    An ECS instance with a higher weight receives more requests.
    You can modify server weights in batches:
    • Click : Duplicate to below. If you modify the weight of the current server, the weights of all servers blow are also changed.
    • Click : Duplicate to above. If you modify the weight of the current server, the weights of all servers above are also changed.
    • Click : Duplicate to all. If you modify the weight of the current server, the weights of all servers in the default server group are also changed.
    • Click : Clear all. If you clear the weight of the current server, the weights of all servers in the default server group are also cleared.
    Notice If the weight is set to 0, the server no longer receives new requests.


  9. Click OK.