You need to enable JavaScript to run this app.
Load Balancer

Load Balancer

Copy page
Download PDF
Server groups
Adding secondary network interfaces as backend servers
Copy page
Download PDF
Adding secondary network interfaces as backend servers

A secondary network interface is a type of elastic network interface. Secondary network interfaces can be attached to ECS instances within a VPC and can be migrated between different ECS instances.

ALB allows you to add both the primary private IP address and secondary private IP addresses of a secondary network interface to a server group.

To use a secondary network interface as a backend server, you need to perform the following operations:

  1. Add the secondary network interface: Add IP addresses of the secondary network interface to the server group.
  2. Configure a network interface route: Manually configure a network interface route to ensure that the backend server can correctly respond to requests from clients or ALB instances.

Before you begin

The secondary network interface must be attached to an ECS instance. For detailed instructions, see Attaching a secondary network interface.

Procedure

  1. Log in to the ALB console.

  2. In the left-side navigation pane, click Server group to go to the Server group page.

  3. On the Server group page, find the server group to which you want to add a backend server, and then click Add backend server in the Actions column.

  4. On the Select backend server page, enable Advanced mode.

  5. Select the secondary network interface attached to the ECS instance, select IP addresses, and then click Next: configure ports and weights. You can select one or more IP addresses of the secondary network interface.

  6. On the Configure ports and weights page, set the port and weight for the backend server, and then click Save.

    tip

    • When you select multiple IP addresses of a secondary network interface as backend servers, you need to configure the port and weight for each IP address separately.
    • If you need to configure the same port or weight for multiple backend servers in batch, you can select these backend servers, click Set same weight or Set same port at the bottom of the list, and then enter a value.

    Parameter

    Description

    Port

    Configure the port of the backend server. The backend server uses this port to provide services and receive requests. Valid values: 1 to 65535.

    Weight

    Configure the weight of the backend server. Default value: 100. Valid values: 0 to 100.

    • The weight determines the proportion of traffic distribution. The proportion of requests received by a single backend server = Weight of the backend server/Sum of weights of all backend servers in the server group.
    • Backend servers with higher weights receive more requests. If the weight of a backend server is 0, ALB will not forward requests to this backend server.
    • When the load balancing algorithm applied to the server group is Source IP Hash, ALB no longer forwards requests based on weights.

    Copy

    Optional. Click Clone to clone an added backend server entry. After that, enter a different port number in the new entry. This method allows ALB to forward requests to different ports of the same backend server.

    Remove

    Optional. Click Remove to remove the added backend server.

Configure a network interface route

ALB uses the private CIDR block 100.64.0.0/10 to forward client requests and send health check requests to backend servers. When a secondary network interface is used as a backend server, you need to configure a route containing this private CIDR block 100.64.0.0/10 for the network interface. This allows the backend server to properly respond to client requests and health check requests.
The route information that needs to be configured is as follows:

Destination Address

Destination Address Mask

Gateway Address

Network Interface

Hop Count

100.64.0.0

255.192.0.0

Gateway address of the subnet where the network interface is located

Name of the secondary network interface, such as eth2

100

For specific methods to configure a network interface route, refer to Configure a network interface route.

warning

After configuring routes through the command line interface (CLI), if you restart the ECS instance, the manually added routes will be cleared. In this case, you need to reconfigure the routes.

Last updated: 2025.07.04 16:28:47