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 cloud servers and 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.
Figure 1 Routing requests to cloud 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.
IP as Backend Server Scenarios
After you enable IP as a Backend, you can add backend servers by using their IP addresses. You need to get prepared for different scenarios as shown in Table 1.
Where Servers Are Running | Preparations | |
---|---|---|
In a different VPC from the load balancer | Set up a VPC peering connection between the VPC where the load balancer is running and the VPC where the servers are running. For details about how to set up a VPC peering connection, see the Virtual Private Cloud User Guide. | |
In on-premises data centers | Connect the on-premises data center to the VPC where the load balancer is running through Direct Connect or VPN. For details about how to connect on-premises data centers to the cloud, see the Direct Connect User Guide or Virtual Private Network User Guide. |
Enabling IP as a Backend
- Log in to the management console.
- Click
in the upper left corner of the console and select a desired region and project.
- Click
in the upper left corner to display Service List and choose Network > Elastic Load Balance.
- 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
- Log in to the management console.
- Click
in the upper left corner of the console and select a desired region and project.
- Click
in the upper left corner to display Service List and choose Network > Elastic Load Balance.
- In the navigation pane on the left, choose Elastic Load Balance > Backend Server Groups.
- 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.
- Log in to the management console.
- Click
in the upper left corner of the console and select a desired region and project.
- Click
in the upper left corner to display Service List and choose Network > Elastic Load Balance.
- In the navigation pane on the left, choose Elastic Load Balance > Backend Server Groups.
- 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.
NoteYou 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.
- Log in to the management console.
- Click
in the upper left corner of the console and select a desired region and project.
- Click
in the upper left corner to display Service List and choose Network > Elastic Load Balance.
- In the navigation pane on the left, choose Elastic Load Balance > Backend Server Groups.
- 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.
- Notes and Constraints
- IP as Backend Server Scenarios
- Enabling IP as a Backend
- Adding IP as Backend Servers
- Modifying the Ports/Weights of IP as Backend Servers
- Removing IP as Backend Servers