How do I set up UDP load balancing with my Network Load Balancer?

3 minute read
0

I want to register a User Datagram Protocol (UDP) service to my Network Load Balancer. How can I do this?

Resolution

Create a new target group using UDP

  1. Open the Amazon Elastic Cloud Compute (Amazon EC2) console.
  2. From the navigation pane, choose Target Groups.
  3. Choose Create target group.
  4. For Target type, choose Instances or IP addresses.
  5. For Target group name, enter a name for the target group.
  6. For Protocol, choose UDP or TCP_UDP.
  7. For Port, choose the port that the service is listening on.
  8. For VPC, choose your VPC.
  9. For Health check protocol, choose TCP, HTTP, or HTTPS.
  10. Expand Advanced health check settings, and then choose Override.
  11. For Healthy threshold, enter the number of health checks.
  12. Choose Next, and then choose Create target group.

For more information, see Create a target group for your Network Load Balancer.

Register targets to the target group

  1. Open the Amazon EC2 console.
  2. From the navigation pane, in Load Balancing, choose Target Groups.
  3. In Target groups, choose your target group, choose Actions, and then choose Register targets.
  4. For Available instances, choose your Instance ID or IP address that you created previously, and then choose Include as pending below.
  5. Choose Register pending targets.

For more information, see Register targets with your target group.

Modify the health check for the target group

  1. Open the Amazon EC2 console.
  2. From the navigation pane, in Load Balancing, choose Target Groups.
  3. In Target groups, choose your target group.
  4. Choose the Health checks tab, and then choose Edit.
  5. In Health check protocol, choose your protocol (TCP, HTTP, or HTTPS).
  6. Expand Advanced health check settings.
  7. In Port, choose either Traffic port or Override, and then choose Save changes.

For more information, see Modify the health check settings of a target group.

Add a listener to your Network Load Balancer

  1. Open the Amazon EC2 console.
  2. From the navigation pane, in Load Balancing, choose Load Balancers.
  3. Choose your Network Load Balancer, choose the Listeners tab, and then choose Add listener.
  4. Choose the Protocol dropdown list, and then choose your protocol (UDP or TCP_UDP).
  5. Choose the Select a target group dropdown list, choose your target group, and then choose Add.

For more information, see Create a listener for your Network Load Balancer.


Related information

UDP load balancing for Network Load Balancer

AWS OFFICIAL
AWS OFFICIALUpdated 2 years ago