187 karma · joined September 14, 2018
* Retries are one layer. By default set to 3 retries. HAProxy will retry the failed connection or request with the same server.
* "option redispatch" is another layer. If HAProxy can't connect to a server that is reporting as healthy, it will send the request to a different server.
* health checks are a layer. HAProxy removes unresponsive servers from load balancing.
* Backup servers are another layer. If all servers fail their health checks and are down, then backup servers come online to service requests.
All these things can be enabled in combination, and it would reduce the chance of a client getting a server error.
To answer your question, HAProxy will not connect with a server that is down (failed all its health checks). It will not retry with it either.
* ACL rules with full support for logical if statements [1]
* active health checks
* end-to-end HTTP/2 [2]
* Robust logging or a dashboard with metrics
* The ability to read env variables
* session stickiness
* DNS service discovery [3]
These are just things I'm aware of, there could be a lot more.
HAProxy has shown itself to perform better for certain users such as Booking.com [4]
[1] https://www.nginx.com/resources/wiki/start/topics/depth/ifis... [2] https://trac.nginx.org/nginx/ticket/923 [3] https://danielparker.me/haproxy/nginx/comparison/nginx-vs-ha... [4] https://events.static.linuxfound.org/sites/events/files/slid...