Leader election - synapse

leader election implementation in Synapse