Created
March 4, 2014 21:40
-
-
Save rgs1/9356362 to your computer and use it in GitHub Desktop.
A write request's journey in ZooKeeper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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