All Products
Search
Document Center

Server Load Balancer:Add backend servers by specifying ENIs

Last Updated:Sep 12, 2023

An elastic network interface (ENI) is a virtual network interface that can be attached to an Elastic Compute Service (ECS) instance in a virtual private cloud (VPC). You can use ENIs to deploy high-availability clusters, achieve cost-effective failover, and conduct fine-grained network management. To add a backend server to the server group of an Application Load Balancer (ALB) instance, you can specify the primary and secondary private IP addresses of an ENI that is attached to the backend server.

Background information

If more than one ENI is attached to an ECS instance, you can specify the primary and secondary private IP addresses of an ENI when you add the ECS instance to a server group of ALB. For more information about how to attach an ENI to an ECS instance, see Overview.

Prerequisites

  • A server group of the Server type is created. For more information about how to create a server group, see Create a server group.

  • An ECS instance is created and an ENI is attached to the ECS instance. The ECS instance and the ALB server group belong to the same VPC.

    • For more information about how to create an ECS instance, see Purchase an ECS instance.

    • For more information about how to attach a secondary ENI to an ECS instance, see Attach ENIs.

Procedure

  1. Log on to the ALB console.
  2. In the top navigation bar, select the region where the server group that you want to manage is deployed.

  3. In the left-side navigation pane, choose ALB > Server Groups.

  4. On the Server Groups page, find the server group of the Server type and click Modify Backend Server in the Actions column.

  5. On the Backend Servers tab, click Add Backend Server.

  6. In the Select Servers step, set Server Type to ECS/ENI and turn on Advanced Mode.

    Note

    You can add the primary and secondary IP addresses of an ENI in advanced mode. You can also switch back to the standard mode as needed.

  7. In the server list, click the Plus icon next to the ID of an ECS instance, select an ENI, and then click Next.

    Note

    Select an ECS instance to which an ENI is attached.

  1. In the Ports/Weights step, set the port and weight of the server and click OK.

    The default weight is 100. A server that has a higher weight receives more requests. If session persistence is enabled, requests may not be evenly distributed to backend servers.

    You can move the pointer over the 批量操作 icon and perform one of the following actions to change the weights of multiple servers at a time:

    • Click Replicate to Below: The weights of the servers below the current server are set to the weight of the current server.

    • Click Replicate to Above: The weights of the servers above the current server are set to the weight of the current server.

    • Click Replicate to All: The weights of the servers in the server group are set to the weight of the current server.

    • Click Reset next to Weight: The weights of the servers in the server group are reset to the default value.

    Important

    If you set the weight of a server to 0, the server does not receive requests.

References