I'm trying to setup HAProxy as an highly available reverse proxy. We're running it on a cluster of 3 nodes, where all nodes are identical. When a service is down on one of the node, any of the other nodes can handle the http request.
Therefore, I'm trying to setup HAProxy as such:
frontend main
bind *:80
default_backend back
backend back
server node01 localhost:8080 check fall 1 rise 1
server node02 node02:80 backup
server node03 node03:80 backup
This works, however, there's a window where HAProxy will return a 503 Service Unavailable
when service
is down and HAProxy is in the process of doing the failover towards node02
.
Is there any way to setup HAProxy to detect that the request sent to service will not be handled, and to forward it to node02
without any interruption of service?
TLDR: Is there any way to setup HAProxy for transparent failover to backup servers?