Backend Server health check for more than one port at the same time

Hi!

I’m searching for a solution to check my backend servers for more than one port at the same time. This is my current example config:

backend my_backend
....
server webserver120 192.168.178.100:8080 check port 99

Now i want to add a check for port 100 and 101 for example - or combine this with a httpcheck and tcp check, so as soon as one health check fails, the server should be marked as DOWN.

Is this possible ?

My HAProxy Version is 1.8.x

Hi,

you can do this with the tcp-check. If you look at the example for tcp-check connect you’ll see how you can probe two ports.

1 Like

Great thank you!

Last question: Would it be possible to combine this with a httpcheck ?

in 1.8 I believe you can’t. You must do the httpcheck with option tcp-check (linked doc in previous post also has an example).