Updated on 2024-05-07 GMT+08:00

Adding IP Addresses as Backend Servers

Scenario

If you enable IP as a backend, you can associate backend servers with the load balancer by using their IP addresses.

You need to get prepared for different scenarios as shown in Table 1.

Table 1 Adding IP addresses as backend servers

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 the same VPC as the load balancer

Set up a VPC peering connection for the VPC where the load balancer and the servers are running, and then add routes for the VPC peering connection.

For details, see Routing Traffic to Backend Servers in the Same VPC as the Load Balancer.

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.

Constraints and Limitations

  • If IP as a backend is not enabled when you create a load balancer, you can enable it on the Summary page of the load balancer.
  • Only private IPv4 addresses can be added as backend servers.
  • The backend subnet of the load balancer must have sufficient IP addresses (at least 16 IP addresses). Otherwise, backend servers cannot be added through IP addresses. If the IP addresses are insufficient, you can add more backend subnets on the Summary page of the load balancer.
  • Security group rules of backend servers added through IP addresses must allow traffic from the backend subnet of the load balancer. If traffic is not allowed, health checks will fail.

Procedure

  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. Hover on 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 page and click Add on the IP as Backend Servers area.
  7. Specify the IP addresses, ports, and weights for the backend servers.
  8. Click OK.