Adding Backend Servers in a Different VPC from a Load Balancer
Dedicated load balancers can distribute traffic across cloud servers and on-premises servers. You can add ECSs, BMSs, or supplementary network interfaces in the VPC where the dedicated load balancer is created. After enabling IP as a backend, you can also add the IP addresses of servers in other VPCs or in your on-premises data center.
In this way, incoming traffic can be flexibly distributed to cloud servers and on-premises servers.
Notes and Constraints
- IP as a Backend cannot be disabled after it is enabled.
- Before forwarding requests to servers in other VPCs, ensure that the target VPC can communicate with the VPC where the load balancer is created.
- Only private IPv4 addresses can be added as backend servers.
- A maximum of 100,000 concurrent connections can be established with a backend server that is added by using its IP address.
- If you add IP addresses as backend servers, the source IP addresses of the clients cannot be passed to these servers. Install the TOA module to obtain source IP addresses.
Distributing Traffic Across IP as Backend Servers
With a wide variety of networking services, you can flexibly connect VPCs in the same region, in different regions, or in different accounts.
After VPCs where IP as backend servers are running are connected, traffic can be distributed across these backend servers.
Where Servers Are Running |
Networking Service |
Function |
Reference |
---|---|---|---|
Different VPCs in the same region |
VPC Peering |
With VPC Peering, you can peer two VPCs in the same region. The VPCs can be in the same account or different accounts. |
|
Enterprise Router |
An enterprise router can connect multiple VPCs in the same account or different accounts to set up a hub-and-spoke network. Compared with VPC Peering, Enterprise Router is more suitable for complex networking where many VPCs need to be connected. |
||
Different VPCs in different regions |
Cloud Connect
|
Cloud Connect can connect VPCs in the same account or different accounts across regions. Cloud Connect provides the following two options:
|
|
VPN |
VPN allows VPCs in different regions to communicate with each other over the Internet. |
||
Direct Connect |
VPCs in different regions can be connected through Direct Connect connections. |
||
On-premises data centers |
VPN |
VPN connects on-premises data centers and VPCs over the Internet. |
Configuring Enterprise Edition S2C VPN to Connect an On-premises Data Center to a VPC |
Direct Connect |
You can use Direct Connect to connect a VPC to an on-premises data center. |
Using Direct Connect to Connecting an On-premises Data Center to the Cloud |
Enabling IP as a Backend
- Go to the load balancer list page.
- On the load balancer list page, click the name of the target load balancer.
- On the Summary tab, click Enable next to IP as a Backend.
- Click OK.
Adding IP as Backend Servers
- 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 Add above the IP address as backend server list.
- Specify the IP addresses, backend ports, and weights.
- Click OK.
Modifying the Ports/Weights of IP as Backend Servers
The server weight ranges from 0 to 100. If you set the weight 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.
- 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 IP as Backend Servers.
- Select the servers and click Modify Port/Weight up the server list.
- In the displayed dialog box, modify ports/weights as you need.
- Modifying ports:
- Modifying the port of an IP as backend server: Set the port in the Backend Port column.
- Modifying the ports of multiple IP as backend servers: Set the port next to Batch Modify Ports, and click OK.
- Modifying weights:
- Modifying the weight of an IP as backend server: Set the weight in the Weight column.
- Modifying the weights of multiple IP as backend servers: Set the weight next to Batch Modify Weights and click OK.
You can set the weights of multiple servers to 0 to block them from receiving requests routed by each load balancer.
- Modifying ports:
- Click OK.
Removing IP as Backend Servers
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 IP as Backend Servers.
- Select the IP as backend servers to be removed and click Remove above the 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