Reverse Proxy failover scenarios

Architecturefailoverload balancingredundancyreverse-proxy

I currently have 2 apache web-servers that run ldirectord/heartbeat to load balance between them. Whenever I reboot one of the web-servers, or take it down for maintenance, ldirectord automatically fails over to run on the live web-server, and there is no downtime for my sites.

I am considering putting a cacheing reverse proxy in front of my web-servers to alleviate some of the load on the main servers.

My question is, in order to retain the redundancy and the ability to shut down any of my servers without interrupting services, do I need to be setting up 2 reverse proxy servers, or is there some way that my main servers can continue to serve requests while the single reverse-proxy server in front of them is down?

Best Answer

One approach I can think of is to add the proxy server to your heartbeat HA cluster as the primary. If you're using a virtual IP for the web host, the proxy server can assume the VIP by default. If it goes down, the VIP can pass on to one of the actual web servers.