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 and achieve cost-effective failovers and fine-grained network management. You can add a backend server to the server group of an Application Load Balancer (ALB) instance by specifying the IP address of the primary or secondary ENI that is attached to the backend server.

Background information

If more than one ENI are attached to an ECS instance, you can specify the IP address of the primary or secondary ENI when you add the ECS instance to a server group.

For more information about how to attach an ENI to an ECS instance, see Bind an ENI.

Procedure

  1. Log on to the SLB console.
  2. In the left-side navigation pane, choose ALB > Server Groups.
  3. On the Server Groups page, find the server group that you created and click Modify Backend Server in the Actions column.
  4. On the Backend Servers tab, click Add Backend Server.
  5. In the My Servers panel, select ECS/ENI from the Select Backend Server Type list. Turn on Advanced Mode, select the ECS instance that you want to add, and click Next.
    Note You can specify the IP address of the primary or secondary ENI in advanced mode. You can also switch back to the standard mode at any time.
  6. On the Configure Ports and Weights wizard page, specify ports and weights for the backend servers and click Add.
    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 the 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.
    Notice After you set the weight of a backend server to 0, no request is distributed to the backend server.