Suppose we have several identical nodes which are the application servers of some n-tier service. And suppose we use Apache ZooKeeper to keep all the config's of our distributed application. Plus we have an nginx as a load balancer and reverse proxy in front of this application.
So let's say we perform a command which changes data only on node1, and for some period of time node2 differs from node1. And we want proxy to redirect all that special requests (which need that specific data) to node1 until all the infomation has migrated to node2 and node2 has the same data as node1.
Is there any way to make nginx (or other proxy) read its config from Apache ZooKeeper? Or more broader: is there any way to effectively switch proxy configuration on fly? And of course it should be done without (or with minimal) downtime of the whole system - so restarting nginx is not the option.