Hi all. I'm trying to setup a reverse proxy with failover to a hot standby using mod_proxy_balancer. This works perfectly when all application servers are functioning correctly, and the reverse proxy correctly fails over to the hot standby if the http service on the primary application server fails.
Where I'm having difficulty is working out how to get httpd to mark a
particular application server as 'broken', when it cannot get access to
a required resource (in this case, if the database server has failed).
The reverse proxy is httpd 2.2.8 (event MPM), and the application
servers are httpd 2.2.8 (worker MPM) with mod_fastcgid, connected to a
python fastcgi application. The OS in all cases is FreeBSD 7.
Here is my configuration:
<VirtualHost *:80>
ServerName foobar
DocumentRoot "/var/empty"
<Proxy balancer://idp-cluster>
BalancerMember http://foo:5501
BalancerMember http://bar:5501 status=+H
</Proxy>
ProxyPass /balancer !
ProxyPass / balancer://idp-cluster/
ProxyPassReverse / http://foo/
ProxyPassReverse / http://bar/
<Location /balancer>
SetHandler balancer-manager
Order Deny,Allow
Deny from all
Allow from 10.
</Location>
</VirtualHost>
The only way I can think to do this is to have some sort of heartbeat
service which monitors the resources each app server requires, and
disable the appropriate app server, or similarly to disable the app
server from the app itself if it cannot access the DB.
This seems a little messy. Is there any way to signify from the
application server, via response headers, to say "I'm bust, please stop
using me"?
Cheers
Tom
signature.asc
Description: This is a digitally signed message part
