Help Center/ Elastic Load Balance/ User Guide/ User Guide for Dedicated Load Balancers/ Backend Server/ Adding Backend Servers in the Same VPC as a Load Balancer
Updated on 2024-09-20 GMT+08:00

Adding Backend Servers in the Same VPC as a Load Balancer

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.

You can add ECSs, BMSs, or supplementary network interfaces in the VPC where the dedicated load balancer is created.

Notes and Constraints

  • Cloud servers and supplementary network interfaces can only be added to a hybrid backend server group.
  • Only ECSs, BMSs, and supplementary network interfaces in the same VPC as the backend server group can be added.
  • Dedicated load balancers have compatibility requirements on BMS flavors. Only BMSs with certain flavors can be added as backend servers.

Procedure

  1. Go to the load balancer list page.
  2. On the Backend Server Groups page, click the name of the target backend server group.
  3. Click the Backend Servers tab and add servers as required.
    1. Cloud server (ECSs or BMSs): Locate the Backend Servers area and click Add on the right. On the displayed page, search for the cloud servers by keyword and then add the private IP address. If you use private IP addresses for search, you can select the private IP address bound to either the primary or extension NIC.
    2. Supplementary network interfaces: Locate the Supplementary Network Interfaces area and click Add on the right. On the displayed page, search for the supplementary network interfaces by keyword.
  4. Select the servers you want to add and click Next.
  5. Specify the weights and ports for the servers and click Finish.

    You can set ports and weights in batches.

Modifying the Port and Weight of a Backend Server

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.

  1. Go to the load balancer list page.
  2. On the Backend Server Groups page, click the name of the target backend server group.
  3. On the Backend Servers tab, click Backend Servers or Supplementary Network Interfaces.
  4. Select the target backend servers and click Modify Port/Weight up above the backend server list.
  5. 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.

  6. 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. Go to the load balancer list page.
  2. On the Backend Server Groups page, click the name of the target backend server group.
  3. Switch to the Backend Servers tab and click Backend Servers or Supplementary Network Interfaces.
  4. Select the backend servers you want to remove and click Remove above the backend server list.
  5. In the displayed dialog box, click OK.