All Products
Search
Document Center

ENS:Configure a TCP listener

Last Updated:Apr 01, 2026

Add a TCP listener to your Edge Load Balancer (ELB) instance to forward TCP traffic to backend servers. TCP listeners are suited for workloads that require data consistency, reliability, and integrity — such as file transfer, email services, and remote login — and can tolerate a relatively low transmission speed.

Prerequisites

Before you begin, ensure that you have:

Add a TCP listener

  1. Log on to the ENS console.

  2. On the ELB Instance page, find the target ELB instance and click Listener Configuration in the Actions column.

  3. On the Listener tab, click Add Listener.

  4. Configure the listener parameters.

    ParameterDescriptionExample
    Listener NameA name for the listener.tcp-listener-80
    ELB ProtocolSelect TCP.TCP
    Listener PortThe port on which ELB receives and forwards requests to backend servers. Valid values: 1–65535.80
  5. Click Modify under Advanced Settings and configure the following parameters.

    ParameterDescriptionExample
    Scheduling algorithmThe algorithm used to distribute requests across backend servers. See Choose a scheduling algorithm for details.WRR
    Session persistenceWhether to forward all requests from the same client to the same backend server. When enabled, configure the timeout period below.Enabled
    Session persistence timeout periodHow long ELB maintains a session when no new requests arrive. After the timeout, the session is automatically disconnected. Valid values: 1–3600 seconds.300
    Connection timeout periodHow long ELB keeps an idle TCP connection open. After the timeout, ELB automatically closes the connection. Valid values: 10–900 seconds.60
    Obtain Client IP AddressWhether to pass the original client IP address to backend servers. Only Layer 4 listeners support this feature. Enabled by default.Enabled
  6. Click Next and configure health checks. See Configure health checks.

  7. Click Next, review the configuration, and click Create.

  8. On the Listener tab, find the listener and click Enable in the Actions column.

Choose a scheduling algorithm

Select the algorithm that best matches your traffic pattern and session requirements.

AlgorithmHow it works
Weighted Round-Robin (WRR)Distributes requests based on server weights. Servers with higher weights receive proportionally more requests.
Round-Robin (RR)Distributes requests to backend servers in sequence, regardless of weight or load.
Weighted Least Connections (WLC)Routes each request to the server with the fewest active connections, adjusted by weight. If weights are equal, the least-loaded server gets the request.
Consistent Hashing (CH)Uses source IP-based consistent hashing. Requests from the same client IP always go to the same backend server.

What's next