airbnb/synapse — pull request #79 by qasimkhan (2014-07-10 08:37:43+00:00)
Title: Active version watcher

To avoid the collision of different releases (as by default all nodes share the same path) in immutable infrastructure we need some sort of identifier which tells about the active version so we can switch between different releases.

This watcher is build on top of ZK watcher. It will watch the active version along with the nodes and as soon as a version changes it will update the synapse config with latest version and reload the haproxy.
e.g. version 1 nodes are resgitered in the following path using nerve `/services/service1/v1` and the active version path `/version/service1` is set to v1. All version 2 nodes will go to `/service/service1/v2` and once all the nodes are ready we can switch version to v2 on `/version/service1`