Updated on 2025-09-25 GMT+08:00

Adding a UDP Listener

Scenarios

You can add a UDP listener, if quick response is required but low reliability is acceptable. UDP listeners are suitable for scenarios such as video chat, gaming, and real-time financial news.

Constraints

  • UDP listeners do not support fragmentation.
  • Any UDP packet larger than 1,500 bytes will be discarded. To avoid this, ensure that the MTU value of the network interface is not greater than 1,500 bytes and modify the configuration files of applications based on the MTU value.
  • The backend protocol can be UDP or QUIC if the frontend protocol is UDP.
  • If you only select the application load balancing type for your dedicated load balancer, you cannot add UDP listeners to this load balancer.
  • When a UDP listener routes traffic to IP as backend servers in a UDP backend server group over a Direct Connect or VPN connection, the health check result may be unhealthy. In this case, submit a service ticket.

Procedure

  1. Go to the load balancer list page.
  2. On the displayed page, locate the load balancer and click its name.
  3. On the Listeners tab, click Add Listener. Configure the parameters based on Table 1.
    Table 1 Parameters for configuring a UDP listener

    Parameter

    Description

    Frontend Protocol

    Specifies the protocol that will be used by the load balancer to receive requests from clients.

    Select UDP.

    Listening Port

    Specifies a port or port ranges that will be used by the load balancer to receive requests from clients.

    • Single port: The listener listens only on the specified port.
    • Port ranges: The listener listens on all ports in the specified port ranges and routes them to the corresponding ports on the backend servers, if the frontend protocol is TCP, UDP, or TLS.

    Name (Optional)

    Specifies the listener name.

    Transfer Client IP Address

    This option is enabled for dedicated load balancers by default.

    When a UDP listener is used to forward requests, its load balancer communicates with backend servers using client IP addresses. In this case, you can check the backend server logs to obtain client IP addresses.

    Note that client IP addresses cannot be passed to IP as backend servers.

    Access Control

    Specifies how access to the listener is controlled. For details, see What Is Access Control?

    All IP addresses is selected for access control by default.

    You can select Whitelist or Blacklist and choose an IP address group.
    • Whitelist: Only IP addresses in the whitelist can access the listener. Requests from the IP addresses or CIDR blocks specified in the IP address group will be forwarded by the listener.
    • Blacklist: IP addresses in the blacklist are not allowed to access the listener. Requests from the IP addresses or CIDR blocks specified in the IP address group will not be forwarded by the listener.

    More (Optional)

    Idle Timeout (s)

    Specifies the length of time for a connection to keep alive, in seconds. If no request is received within this period, the load balancer closes the connection and establishes a new one with the client when the next request arrives.

    The idle timeout duration ranges from 10 to 4000.

    Tag

    Adds tags to the listener. Each tag is a key-value pair, and the tag key is unique.

    Description

    Provides supplementary information about the listener.

    You can enter a maximum of 255 characters.

  4. Click Next: Configure Request Routing Policy.
    1. You are advised to select an existing backend server group.
    2. You can also select Create new to create a backend server group.
      1. Configure the backend server group based on Table 3.
      2. Click Next: Add Backend Server. Add backend servers and configure a health check for the backend server group.

        For details about how to add backend servers, see Backend Server Overview. For the parameters required for configuring a health check, see Table 4.

  5. Click Next: Confirm.
  6. Confirm the configurations and click Submit.