Updated on 2024-06-20 GMT+08:00

Cloud Servers

When you use ELB to route requests, ensure that at least one backend server is healthy and can process requests routed by the load balancer.

If the incoming traffic increases, you can add more cloud servers to ensure the stability and reliability of applications and eliminate SPOFs. If the incoming traffic decreases, you can remove some backend servers to reduce the cost.

Constraints

  • Cloud servers can only be added to a hybrid backend server group.
  • The cloud servers must be in the same VPC as the backend server group.

Adding a Cloud Server

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Click in the upper left corner to display Service List and choose Networking > Elastic Load Balance.
  4. In the navigation pane on the left, choose Elastic Load Balance > Backend Server Groups.
  5. On the Backend Server Groups page, click the name of the backend server group.
  6. Switch to the Backend Servers tab and click Add above the cloud server list.
  7. Search for cloud servers using keywords.

    Select the cloud servers you want to add and click Next.

  8. Specify the weights and ports for the cloud servers and click Finish.

    You can set backend ports in batches.

Modifying Cloud Server Ports/Weights

The server weight ranges from 0 to 100. If you set the weight of a cloud server to 0, new requests will not be routed to this server.

The weights can only be specified when you select weighted round robin, weighted least connections, or source IP hash as the load balancing algorithm. For more information about load balancing algorithms, see Backend Server Weights.

Only certain regions support backend port modification. See the details on the management console.

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Click in the upper left corner to display Service List and choose Networking > Elastic Load Balance.
  4. In the navigation pane on the left, choose Elastic Load Balance > Backend Server Groups.
  5. On the Backend Server Groups page, click the name of the target backend server group.
  6. On the Backend Servers tab, click Backend Servers.
  7. Select the cloud servers and click Modify Port/Weight up above the cloud server list.
  8. In the displayed dialog box, modify ports/weights as you need.
    • Modifying ports:
      • Modifying the port of a cloud server: Set the port in the Backend Port column.
      • Modifying the ports of multiple cloud servers: Set the port next to Batch Modify Ports and click OK.
    • Modifying weights:
      • Modifying the weight of a cloud server: Set the weight in the Weight column.
      • Modifying the weights of multiple cloud servers: Set the weight next to Batch Modify Weights and click OK.

      You can set the weights of multiple cloud servers to 0 to block them from receiving requests routed by each load balancer.

  9. Click OK.

Removing a Cloud Server

If a cloud server is removed, it is disassociated from the load balancer and can still run normally. However, it cannot receive requests from the load balancer. You can add this cloud server to the backend server group again when traffic increases or the reliability needs to be enhanced.

If a cloud server is removed, requests are still routed to it. This is because a persistent connection is established between the load balancer and the cloud server and requests are routed to this server until the TCP connection times out. If no data is transmitted over this TCP connection after it times out, ELB disconnects the connection.

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Click in the upper left corner to display Service List and choose Networking > Elastic Load Balance.
  4. In the navigation pane on the left, choose Elastic Load Balance > Backend Server Groups.
  5. On the Backend Server Groups page, click the name of the target backend server group.
  6. Switch to the Backend Servers tab and click Backend Servers.
  7. Select the cloud servers you want to remove and click Remove above the cloud server list.
  8. In the displayed dialog box, click OK.