Updated on 2023-05-18 GMT+08:00

Configuring Hybrid Load Balancing (Dedicated Load Balancers)

Scenarios

You can add servers in the VPC where the load balancer is created, in a different VPC, or in an on-premises data center, by using private IP addresses of the servers. In this way, incoming traffic can be flexibly distributed to cloud servers and on-premises servers for hybrid load balancing.

Figure 1 Routing requests to cloud and on-premises servers

Prerequisites

  • A dedicated load balancer has been created.
  • A listener has been added to the load balancer.
  • VPC routes have been correctly configured to make backend servers accessible. IP as backend servers can be in a VPC connected using a cloud connection or VPC peering connection, or in an on-premises data center connected using a Direct Connect or VPN connection.

Constraints and Limitations

When you add IP as backend servers, note the following:

  • IP as a backend cannot be disabled after it is enabled.
  • If you do not enable the function when you create a load balancer, you can still enable it on the Basic Information page of the load balancer.
  • IP as backend servers must use IPv4 addresses.
  • If you enable IP as a backend for a load balancer, you can add only TCP, HTTP, and HTTPS listeners to the load balancer.
  • The subnet where the load balancer works must have sufficient IP addresses (at least 16 IP addresses). Otherwise, IP as backend servers cannot be added. You can add more subnets for more IP addresses on the Basic Information page of the load balancer.
  • Security group rules of IP as backend servers must allow traffic from the subnet of the load balancer. Otherwise, health checks will fail.
  • Up to 492 backend servers (including common backend servers and IP as backend servers) can be associated with a listener.

Enabling IP as a Backend

  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. On the Load Balancers page, locate the load balancer and click its name.
  5. On the Basic Information tab page, click Enable next to IP as a Backend.
  6. Click OK.

Adding IP as Backend Servers

  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. On the Load Balancers page, locate the load balancer that you have created and click its name.
  5. In the Backend Server Groups tab, locate the backend server group and click its name.
  6. In the Basic Information area on the right, click IP as Backend Servers.
    Figure 2 Configuring IP as a backend
  7. Click Add IP as Backend Server and set the IP address, backend port, and weight.

    Ensure that the IP addresses of the servers are reachable and the backend ports are actually used by backend servers. Otherwise, the backend servers will be considered unhealthy.

    Figure 3 Adding IP as backend servers using their IP addresses
  8. Click OK.