Help & DocumentationCloud Load BalancerBackend CVMsAdding, Modifying, and Unbinding a Real Server

Adding, Modifying, and Unbinding a Real Server

Last updated: 2020-03-09 14:59:32

PDF

CLB routes requests to real server instances that are running normally. This document describes how to add or delete real servers as needed or when you use CLB for the first time.

  • Unbinding a real server will unbind the CLB instance from the CVM instance, and CLB will immediately stop forwarding requests to it.
  • Unbinding a real server will not affect the lifecycle of your CVM instance, which can also be added to the real server cluster again.
  • If a CLB instance is associated with an auto scaling group, CVMs in the group will be automatically added to the real servers of CLB. When a CVM instance is removed from the auto scaling group, it will be automatically deleted from the real servers of CLB.

CLB

Adding a real server to CLB

  1. Log into the CLB Console and click the corresponding CLB instance ID to enter the CLB details page.
  2. In the listener corresponding to the CLB instance, add a real server.
    • TCP/UDP listener
      When adding a real server, select the listener to be bound in the left column and click Bind. Read the following instruction for operating details.
    • HTTP/HTTPS listener
      When adding a real server, select the listener and rule to be bound in the left column and click Bind. Read the following instruction for operating details.
  3. In the pop-up window, select the CVM to be bound, enter the port and weight, and click OK.

    The pop-up window only displays available CVMs that are not isolated nor expired, in the same region, in the same network environment, and have peak bandwidth greater than 0.

  4. To bind CVMs that have the same preset port value in batches, enter the preset port value in the "Default Port" field, select the corresponding CVMs, configure the weights, and click OK to bind them in batches.

    If you need to use API to add real servers, please see RegisterInstancesWithLoadBalancer API.

Modifying real server weights for CLB

The real server weight determines the number of CVM requests to be forwarded. When binding a real server, you need to preset its weight. To modify the weight, refer to the steps below. For more information on CLB real server weight, please see CLB Polling Method.

  1. Log into the CLB Console and click the corresponding CLB instance ID to enter the CLB details page.
  2. Select the instance and listener rule, select the corresponding CVM from the list, click Edit, enter the new weight, and click Submit to modify the weight of the CVM.
  3. To modify the weight in batches, select all relevant CVMs, click Modify Weight, enter the new weight, and then click Submit.

If you need to use an API to modify real server weights, please see ModifyLoadBalancerBackends API.

Modifying real server ports for CLB

  1. Log into the CLB Console and click the corresponding CLB instance ID to enter the CLB details page.
  2. Select the instance and listener rule, select the corresponding CVM from the list, click Edit, enter the new port, and click Submit to modify the port of the CVM.
  3. To modify the port in batches, select all relevant CVMs, click Modify Port, enter the new port, and then click Submit.

If you need to use API to modify real server ports, please see ModifyTargetPort.

Unbinding real servers from CLB

  1. Log into the CLB Console and click the corresponding CLB instance ID to enter the CLB details page.
  2. Select the listener and rule, select from the list on the right the CVM to be unbound, click Unbind, and then click Submit in the pop-up window.
  3. To unbind CVM instances in batches, select all CVMs to be unbound, click Unbind, and then click Submit in the pop-up window.

If you need to use API to unbind real servers, please see DeregisterTargets API.

Classic CLB

Adding a real server to CLB

  1. Log into the CLB Console and click the corresponding CLB instance ID to enter the CLB details page.
  2. For classic CLB, you need to specify the real server port during listener creation. Click Create, enter the port value in the "Backend Port" field, and then click Next.
  3. Click Bind, select the CVMs to be bound, enter the weights, and click OK (the pop-up window only displays available CVM instances that are not isolated nor expired, in the same region, in the same network environment, and have peak bandwidth greater than 0).

If you need to use an API to add a real server, please see RegisterTargetsWithClassicalLB API.

Modifying real server weights for CLB

  1. Log into the CLB Console and click the corresponding CLB instance ID to enter the CLB details page.
  2. Select the corresponding CVM from the list below the listener, click Modify Weight, enter the new weight, and click Submit to modify the weight of the CVM.
  3. To modify the weight in batches, select all relevant CVMs, click Modify Weight, enter the new weight, and then click Submit.

Currently, real server weight cannot be modified via APIs.

Unbinding real servers from CLB

  1. Log into the CLB Console and click the corresponding CLB instance ID to enter the CLB details page.
  2. Select the corresponding CVMs from the list below the listener, click Unbind, and click Submit in the pop-up window.
  3. To unbind CVMs in batches, select all CVMs to be unbound, click Unbind, and then click Submit in the pop-up window.

If you need to use API to unbind real servers, please see DeregisterTargetsFromClassicalLB API.