Consensus and coordination
How can a leader change preserve acknowledged history?
Slide contents
1. Consensus and coordination
How can a leader change preserve acknowledged history?
2. Two nodes can believe they are leaders
Safety cannot rely on local belief alone.
3. An identical log defines identical transitions
Deterministic state machines apply commands in order.
4. A term monotonically separates leadership attempts
A higher term makes a node abandon its old role.
5. Five participants require a majority of three
Any two majorities of fixed membership intersect.
6. An election needs a majority in one term
A timeout starts an attempt, not a proof of death.
7. Freshness compares the last term before length
Compare the last index only when last terms are equal.
8. Index gives position; term gives the entry’s origin
The command and two numbers serve different roles.
9. AppendEntries starts by checking the shared prefix
A follower checks prevLogIndex and prevLogTerm.
10. Persist votes and logs before dependent replies
Restart must not erase protocol obligations.
11. A leader counts a majority for its current-term entry
After commitment, apply the preceding prefix in order.
12. An old-term entry cannot commit by replica count alone
Figure 8 shows such a suffix being legitimately replaced.
13. A committed new entry secures its older prefix
A current-term no-op is also a log entry.
14. A majority can elect without the minority
A,B are isolated from C,D,E.
15. A former leader must not serve strict reads from memory alone
It may not know about the majority’s new commit.
16. A returning node replaces its conflicting suffix
A higher term removes old authority.
17. Accepting, choosing, and learning are different events
Paxos makes these boundaries explicit.
18. FLP limits universal termination
Determinism; asynchrony; reliable delivery; one possible crash-stop.
19. Progress needs communication before repeated elections
broadcastTime ≪ electionTimeout ≪ MTBF is the paper’s guideline.
20. A durable log does not infer client intent
A lost reply requires the same operation key.
21. The resource checks the owner’s generation itself
Acquiring a lock does not stop an old request.
22. Reject an old token after accepting a newer one
Teaching generations: A=41, B=42.
23. Uncommitted X may be replaced by Y
X is only on A,B; Y commits on C,D,E.
24. Determine commitment, reads, and suffix fate
Five nodes, shared index1, split A,B | C,D,E.
25. The lab checks data, availability, and recovery separately
Three etcd members produce a 2/1 partition.
Acknowledged tasks remain
Minority cannot commit writes
Read mode is explicit
Lagging node caught up
26. Decisions for our service
Determine commitment using the entry’s term.
Trace elections and conflicting-suffix repair.
Separate log consensus from resource fencing.