The frontend of my web application is formed by currently two Apache reverse proxies, using mod_proxy_balancer to distribute traffic over a number of backend application servers. Both frontend reverse proxies, running on separate hosts, are accessible from the internet. DNS round robin distributes traffic over both. In the future, the number of reverse proxies is likely to grow, since the webapplication is very bandwidth-heavy.
My question is: how do I keep the state of both reverse balancers / proxies in sync?
For example, for maintenance purposes, I might want to reduce the load on one of the backend appservers. Currently I can do that by accessing the Balancer-Manager web form on each proxy, and change the distribution rules. But I have to do that on each proxy manually and make sure I enter the same stuff.
Is it possible to "link" multiple instances of mod_proxy_balancer? Or is there a tool out there that connects to a number of instances, and updates all with the same information?
Update: The tool should retrieve the runtime status and make runtime changes, just like the existing Balancer-Manager, only for a number of proxies - not just for one. Modification of configuration files is not what I'm interested in (as there are plenty tools for that).
I recently wrote a tool to do what you need. If it's too late, I hope it can be useful for somebody else. Project's name is ACM (Apache Cluster Manager) and it is available at: http://code.google.com/p/apache-cluster-manager/
There is a ruby module name Amphibian which eases programatic access to the balancer-manager web interface. It may not have all the features you need, but you could add them or use it as an example to write a similar library in another language. Here is an example script that uses it to enable or disable user-specified backend appservers on two proxy balancers.
This could be run like
As I do not know of any tools allowing you to do this, my approach to this problem would be to create a script that goes on every server via SSH and does the modifications you want it to do.
This could be a very simple Python script but I imagine other scripting languages can do this rather easily as well. I would use tools such as sed to do the text modifications.
A more "rational" approach would be to use tools such as Chef or puppet to manage these configuration files but I have no experience with these (not a good thing !)