Queue in front end, if no backed servers available


Is there a way to queue the HTTPS requests in the front end, if no back-end servers are currently available, instead of returning a 503 error to the client?

There is a firewall between my haproxy server and the back end servers. Once in a while, it will have a hiccup and drop all traffic for a second or two. This will fail the health check on all servers. Then I have to wait for the health check to pass before requests will be sent on. So I would like to hold the HTTPS requests in the front end, and wait for a back end server to become available.


I’ve not tested it, but you might try adding a couple of things to your backend (if you haven’t already):

  1. retry-on 503 (or whatever error codes you wish. You can also use all-retryable-errors)
  2. On the server lines, use fall and rise parameters to control how many checks fail before considering a server down and how many succeed to consider a server up respectively.