ZooKeeper lock term
distributed lock using ZK ephemeral sequential nodes
Classic recipe: create ephemeral sequential node, wait until you have the lowest sequence, hold lock, release on disconnect. ZK's session model handles holder crashes automatically.