Discovery (Finding a leader)
- Followers send last proposed epoch to leader.
- The leader gets last accepted epoch, and sends a new epoch which is max(epochs) + 1.
- If followers agree, then folloewrs update epoch and send ACK. If not, repeat step 1.
- Follower with highest zxid becomes leader
Synchronization (Gaining consensus for all followers)
- The follower with the highest zxid becomes leader, and waits for ACK from quorom.
- Followers do
curr_epoch - prev_epoch and issue a DIFF call for missing transactions to synchronize.
- Leader sends DIFFs to followers as necessary. This is appended in WAL before being ACKed.
Broadcast (Accepting new transactions)
- Leader proposes new zxid of
max(epochs) + 1.
- Leader broadcasts new zxid, and followers append to WAL. Followers respond with ACK.
- Leader sends a commit message to followers when it receives ACK from quorom.
- Followers broadcast the transactions amongst each other.