Implementing Distributed Consensus
summary
An educational Paxos implementation called Skinny is built in Go using protocol buffers and gRPC to expose promise and commit RPCs; a five-node quorum simplifies examples and reproduces failures. The code implements proposer/acceptor/learner roles in one process, persists promised/run/holder state, and recovers from nodes that lose state. Practical surprises: global latency makes tight timeouts drop a quorum (the “ghost chrome” effect), concurrent RPCs need context cancellation, backoff and careful channel synchronization to avoid deadlocks.
AI-written summary · about
chapters (25)
- 0:00Intro
- 0:33What?
- 1:33Protocols
- 2:37Paxos Roles
- 7:22Coalesced Roles with Leader
- 7:49Coalesced Roles at Scale
- 9:11Limitations
- 12:36Assuming a wide quorum
- 23:25Lock API
- 24:10Consensus API
- 24:54Control API
- 25:42Skinny Instance
- 26:11Propose Function
- 27:14Resulting Behavior
- 28:14Improvement #1
- 28:37Timeouts
- 29:23Improvement #2
- 30:03Concurrency
- 33:38What's wrong?
- 34:26Solution: More synchronizing
- 37:43Early Stopping (3)
- 40:35Ghost Quorum
- 43:01The Fix
- 43:23Further Reading
- 45:46Try, Play, Learn!
related talks
40mImplementing Distributed Consensus
22mLiberating Distributed Consensus
48mDistributed Consensus Algorithms
40mConsensus Algorithms in Distributed Systems
23mLightning Talks on Distributed Systems
43mAll Together Now: An Introduction to Distributed Consensus
07mA Walk Through Distributed Consensus
46mpg paxos Table Replication through Distributed Consensus
