Hello guys
I have a frontend and backend that looks like this:
frontend httpPort
mode http
bind 0.0.0.0:80
default_backend httpPortTcpForwarder
backend httpPortTcpForwarder
mode http
server first_to_try 127.0.0.1:5588
server second_to_try 10.0.0.2:5588
server last_to_try 127.0.0.1:8080
For my application, first_to_try and second_to_try are most of the time closed (layer 4, connection refused), but open in certain occasions. I’d like to have haproxy attempt to communicate with first_to_try, if it gets “connection refused”, then move to the second option and try it. If it gets “connection refused” again, to move to the default_backend. Is that possible to achieve?
And if you’re wondering why… let’s just call it a blessing of letsencrypt.
1 post - 1 participant