2

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?

Jazzwave06
  • 121
  • 1
  • Before you do something like that you need to ensure that the service can safely handle it. The HTTP standard does not require POST requests to be idempotent, so retrying POST requests can result in undesired results. – kasperd Mar 11 '17 at 21:24

0 Answers0