This topic describes how to add a UDP listener to a Network Load Balancer (NLB) instance to forward UDP requests. UDP is ideal for services that prioritize real-time content delivery over reliability, such as video conferencing and real-time quote services.
Prerequisites
- A NLB instance is created. For more information, see Create and manage an NLB instance.
- A server group is created. For more information, see Create and manage a server group.
Procedure
- Create a UDP listener: the standard configuration method. You can enable the listener to listen by port range and configure advanced settings.
- Create a UDP listener (quick configuration): the quick configuration method. You only need to specify a listening protocol, a listening port, and a server group.
Create a UDP listener
- Log on to the NLB console.
- In the top navigation bar, select the region where the NLB instance is deployed.
- On the Instances page, find the NLB instance that you want to manage and use one of the following methods to open the listener configuration wizard:
- Click Create Listener in the Actions column.
- Click the ID of the NLB instance and click the Listener tab. On the Listener tab, click Create Listener above the listener list.
- Click the instance ID. On the instance details page, click Create Listener in the wizard.
- Click the instance ID. In the upper-right corner of the instance details page, click Create Listener.
- On the Configure Listener wizard page, set the following parameters and click Next.
Parameter Description Listener Protocol Select a listening protocol. In this example, UDP is selected. Listen by Port Range Specify whether to enable the listener to listen by port range. If Listen by Port Range is enabled, the NLB listens to all ports within the port range and directly forwards requests received on the listener ports to the corresponding ports of the backend server. Note- You can enable Listen by Port Range for only one TCP listener (including SSL over TCP) and one UDP listener for an NLB instance.
- You must enable the all-port forwarding feature for server groups that you want to add to listeners that have Listen by Port Range enabled.
Listener Port Range If Listen by Port Range is enabled, you must specify the start and end ports of the Listener Port Range.
Listener Port Specify a Listener Port on which the NLB instance listens. The NLB instance uses the port to receive requests and forward the requests to the backend servers.
You can select a commonly used port, or enter a port number. Valid values: 1 to 65535.
Note If Listen by Port Range is enabled, you do not need to specify this parameter.Listener Name Specify a name for the listener. Advanced Settings Click to show the advanced settings. Idle Connection Timeout Period Specify a timeout period for idle UDP connections. If no request is received within the timeout period, NLB closes the current connection. When a request is received, NLB establishes a new connection. Limit on New Connections Specify whether to limit the number of new connections. Maximum New Connections per Second If Limit on New Connections is enabled, you must specify the maximum number of new connections per second. Enable Proxy Protocol Specify whether to enable Proxy Protocol. After Proxy Protocol is enabled, client IP addresses are passed to the backend servers. - On the Select Server Group wizard page, set Server Type or IP , select a server group based on the specified server type or IP address, confirm the backend servers, and then click Next.
- On the Confirm wizard page, confirm the configurations and click Submit.
Create a UDP listener (quick configuration)
If you select this method, you only need to specify a listening protocol, a listening port, and a server group.
- In the left-side navigation pane, choose .
- On the Instances page, find the NLB instance that you want to manage and click its ID.
- Click the Listener tab. On the Listener tab, click Quick Create Listener.
- In the Quick Create Listener dialog box, set the following parameters and click OK.
Parameter Description Listener Protocol Select a listening protocol. In this example, UDP is selected. Listener Port Specify the frontend port that is used to receive and route requests to backend servers.
You can select a commonly used port, or enter a port number. Valid values: 1 to 65535.
Server Group Set Server Type or IP, and select a server group based on the specified server type or IP address.
References
- CreateListener: creates a TCP or UDP listener, or a listener that uses SSL over TCP for an NLB instance.
- DeleteListener: deletes a listener from an NLB instance.
- ListListeners: queries the list of listeners added to an NLB instance.
- UpdateListenerAttribute: updates the configurations of a listener on an NLB instance.
- StartListener: enables a listener for an NLB instance.
- StopListener: disables a listener for an NLB instance.
- GetListenerAttribute: queries the details of a listener for an NLB instance.
- GetListenerHealthStatus: queries the health check status of a listener for an NLB instance.