Managing loadbalancer pool membership
As part of my work at Global I needed a method for temporarily removing an Apache server from the loadbalancer pool without shutting down the daemon.
I came up with the following addition to the default vhost:
<Location /ping> RewriteEngine On RewriteCond /etc/apache2/inservice -f RewriteRule . - [R=200] RewriteRule . - [R=503] </Location>
The loadbalancer was then configured to poll /ping/ regularly, removing it from the pool if it didn't return OK (200).
The 'inservice' file was placed manually (instead of with puppet), which meant we could be confident if it was absent, the machine wouldn't receive traffic until we restored it.












