Httpd mod_proxy_balancer failover failonstatus - transparent switching

I use mod_proxy_balancer to manage server server fault tolerance. Backend servers may return an error code instead of a timeout when some other backend service fails, such as NFS, and we want these servers to also be flagged as failed nodes. Therefore, we use the failonstatus directive.

<Proxy balancer://avatar> ProxySet failonstatus=503 BalancerMember http://active/ retry=30 # the hot standby BalancerMember http://standby/ status=+H retry=0 </Proxy> 

At present, fault tolerance works fine with a single failure. When node is active, the user receives error 503 and takes the backup server from the next request.

I do not want even one request to fail. Cant mod_proxy failover ever returning error to client? If the active node is not working, I want mod_proxy to try to back up for the same request, and not just from the subsequent request!

+8
apache reverse-proxy failover mod-proxy mod-proxy-balancer
source share
2 answers

I think you asked about it on the Apache HTTPd mailing list, but unfortunately you did not get a satisfactory answer. I asked almost the same question in ServerFault, so I join them together.

https://serverfault.com/questions/414024/apache-httpd-workers-retry

+3
source

There is a new module that does what you ask for https://httpd.apache.org/docs/2.4/mod/mod_proxy_hcheck.html

+1
source

All Articles