502 errors with apache mod_proxy hot standby (or equivalent)

Posted by 6million on Server Fault See other posts from Server Fault or by 6million
Published on 2010-10-20T14:50:00Z Indexed on 2012/12/01 23:07 UTC
Read the original article Hit count: 186

Anyone knows how to configure the hot standby (+H) mod_proxy feature so that the takeover occurs immediately (without even one user receiving a 502) error during a shutdown?

We aren't looking for real load-balancing, we just want a secondary server to take over while we shutdown the primary.

The problem is that whenever the primary goes down, I'm able to slip one invalid request resulting in a 502 HTTP error reaching the end user,before the secondary actually takes over.

Listen 80
<VirtualHost 127.0.0.1:80>
    ServerName domain.com
    ProxyPass / balancer://balance/

    <Proxy balancer://balance/>
        BalancerMember http://primary_ip:80
        BalancerMember http://secondary_ip:80 status=+H
    </Proxy>
</VirtualHost>

© Server Fault or respective owner

Related posts about apache2

Related posts about load-balancing