0

We have a bespoke application built using asio that uses both TCP and UDP. We have deployed our application to AWS and are using a network load balancer. The network LB is performing health checks using TCP however our health checks are failing.

What code do I have to write to ensure that the health check does not fail. I know in the case of HTTP I would just respond with a 200 however I'm not sure what to do in the case of TCP.

Stewart
  • 3,023
  • 2
  • 24
  • 40

1 Answers1

0

To improve the accuracy of health checks for a UDP service, configure the service listening to the health check port to track the status of your UDP service and close the health check port if the service is unavailable.

As per the documentation, health check port has to be listening in order to consider the targets healthy. Make sure health check ports are open for NLB in the target's SGs and these ports are in LISTENING state. Optional, but it is recommended to close the port in case the UDP service fails. Here's how you can open a port in linux Here's how you can configure a script to listen to a port.

It would be a good idea to have a script to listen to your health check port, which checks the status of UDP service and closes the connection if the service is unavailable.

Munavir Chavody
  • 489
  • 4
  • 16