All Products
Search
Document Center

Server Load Balancer:Add backend servers by specifying ENIs

Last Updated:Sep 22, 2023

Elastic network interfaces (ENIs) are virtual network interfaces that can be associated with Elastic Compute Service (ECS) instances in virtual private clouds (VPCs). You can use ENIs to deploy high-availability clusters, perform cost-efficient failover, and manage networks in a fine-grained manner. You can add backend servers to Classic Load Balancer (CLB) by specifying the primary or secondary ENIs of ECS instances.

Background information

If multiple ENIs are attached to an ECS instance to be added to a backend server group of a CLB instance, you can specify the primary ENI or a secondary ENI when you add the ECS instance to the CLB instance.

Limits

  • You can specify the primary and secondary ENIs of ECS instances only for high-performance CLB instances.

  • You can specify only secondary ENIs in the CLB console. To specify primary ENIs, make an API request.

Prerequisites

  • A CLB instance is created and a TCP listener is configured for the CLB instance. In this example, a TCP listener is used.

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

Procedure

  1. Log on to the CLB console.
  2. In the top navigation bar, select the region where the CLB instance is deployed.

  3. On the Instances page, click the ID of the instance for which you want to create a backend server group.

  4. Click the vServer groups, Default Server Group, or Primary/Secondary Server Groups tab to add backend servers. In this example, vServer groups is used.

    Note

    You can specify primary and secondary ENIs for default server groups, vServer groups, and primary/secondary server groups.

  5. On the vServer groups tab, click Create vServer Group.

  6. On the Create vServer Group page, enter a name and click Add.

  7. In the Servers panel, select Show Available Instances Only and turn on Advanced Mode.

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

    If no ECS instance is available, click Purchase ECS Instance in the upper-right corner of the server list.

  9. In the Ports/Weights step, set the Port and Weight parameters and click Add.

  10. On the Create vServer Group page, click Create. In the message that appears, click OK.

  11. Click the Listener tab, find the TCP listener, and then click Modify Listener in the Actions column. Then, add the vServer group to which the ENI belongs to the CLB instance.

    1. In the Protocol & Listener step, click Next.

    2. In the Backend Servers step, select vServer Groups, select the vServer group to which the ENI is added from the Server Group drop-down list, and then click Next. In the Confirm step, click Submit. This way, the vServer group is used as the backend server group of the CLB instance.

  12. Return to the Instances page to view the ECS instance and the ENI that are added to the CLB instance.

    Take note of the following information:

    • ecs: indicates an ECS instance.

    • 虚拟机网卡: indicates a primary or secondary ENI.