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 that you want to add to a backend
server group of CLB, 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 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
belongs to the same VPC as the CLB instance.
Procedure
- Log on to the CLB console.
- In the top navigation bar, select the region where the CLB instance is deployed.
- On the Instances page, click the ID of the CLB instance for which you want to create a backend server
group.
- Click the VServer Groups, Default Server Group, or Primary/Secondary Server Groups tab to create a backend server group. In this example, VServer Groups is used.
Note You can specify primary and secondary ENIs for the default server group, vServer groups,
and primary/secondary server groups.
- On the VServer Groups tab, click Create VServer Group.
- On the Create VServer Group page, click Add.
- In the My Servers panel, select Elastic Compute Service (ECS)/Elastic Network Interface (ENI) from the Select Backend Server Type drop-down list, select Show Available Instances Only, and turn on Advanced Mode.
- In the server list, click the
icon next to the ID of an ECS instance, select the ECS instance and the ENI, and
then click Next. If no ECS instance is available, you can click Buy ECS in the upper-right corner of the instance list.
- In the Ports/Weights step, set the Port and Weight parameters and click Add.
- On the Create VServer Group page, click Create. In the message that appears, click OK.
- Click the Listener tab, find the TCP listener, and click Modify Listener in the Actions column. Then, add the vServer group to which the ENI belongs to the CLB instance.
- On the Protocol and Listener wizard page, click Next.
- On the Backend Servers wizard page, select the vServer group to which the ENI belongs from the Select Server Group drop-down list, and then click Next. On the Confirm page, click Submit. This way, the vServer group is used as the backend server group of the CLB instance.
- Return to the Instances page to view the ECS instances and ENIs that are added to the CLB instance.