Skip to content

Instantly share code, notes, and snippets.

@rgs1
Created March 4, 2014 21:40
Show Gist options
  • Save rgs1/9356362 to your computer and use it in GitHub Desktop.
Save rgs1/9356362 to your computer and use it in GitHub Desktop.
A write request's journey in ZooKeeper
client → write request → zk_server_1
write request is sent to the leader
leader fans out a transaction proposal to all followers
↓ ↓ ↓ ↓
follower 1 follower 2 follower 3 follower 4
followers, non-synchronously, acknowledge the proposal
when the leader gets a sufficient number of acks (from a "majority") it fans out COMMIT msgs to followers
↓ ↓ ↓ ↓
follower 1 follower 2 follower 3 follower 4
followers will then apply the write which triggers watches, that in turn will flow to listening clients...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment