An Introduction to Raft (CoreOS Fest 2015)
NextIndex: what to send to this specific follower to sync
Once nextindex == end of server.log, then appendentries become heartbeat only
Leader could mark one entry committed once it be replicated by majority of clusters
Sever will send his committed index to the followers, followers could upgrade status
Missing entry -> S4, get all result of S2
Conflict entry -> S1, S2 will just remove S1's entries
Term 3 will become leader
SAFETY
Even S5 become leader, but due to its TERM is low, will change to follower
Middle server will never vote bottom server, index
Upper server will never vote middle server, term
Designing for Understandability: The Raft Consensus Algorithm
Paxos, proposers and acceptors, proposer will accept the one with highest proposal number
Abstract of time, used to determine absolute items
Safety: nothing bad happens
Liveness: something good happens
Two entries in the same position has the same term, could guarantee they have the same command
Case1: term matched
Case 2: follower didn't match with server's term, server knows dismatch then he will jump 1 term earlier
How to guarantee leader holds all entries
When candidate ask for a vote, it send out its last latest entry.
Based on term and index decide for completeness