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
- Go to the backend server group list page.
- On the Backend Server Groups page, click the name of the target backend server group.
- Click the Backend Servers tab and add servers as required.
- 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.
- 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.
- Select the servers you want to add and click Next.
- 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.
- Go to the backend server group list page.
- On the Backend Server Groups page, click the name of the target backend server group.
- On the Backend Servers tab, click Backend Servers or Supplementary Network Interfaces.
- Select the target backend servers and click Modify Port/Weight up above the backend server list.
- 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.
- Modifying ports:
- 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.
- Go to the backend server group list page.
- On the Backend Server Groups page, click the name of the target backend server group.
- Switch to the Backend Servers tab and click Backend Servers or Supplementary Network Interfaces.
- Select the backend servers you want to remove and click Remove above the backend server list.
- In the displayed dialog box, click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot