Distributed systems: CAP theorem and consensus
Systems of networked computers that must cope with failures and agree on shared state.
Edited by Alex C, EduAlx · Sources cited below
Explanation
Brewer's CAP theorem (proved by Gilbert and Lynch, 2002): under a network partition, a system must choose between consistency and availability. Paxos (Lamport) and Raft (Ongaro and Ousterhout, 2014) achieve consensus with crash failures. MapReduce (2004) and Spark process big data across clusters.
Example
How it works, step by step
- Replicate data across nodes
- Leader proposes updates
- Majority acknowledges
- Commit and apply in order
- Elect a new leader on failure
Open the interactive page with diagrams →
People behind it
- Leslie Lamport (b. 1941), Distributed systems, USA: Developed logical clocks, Paxos consensus and LaTeX. Turing Award 2013.
- Eric Brewer
- Nancy Lynch
- Jeffrey Dean
- Sanjay Ghemawat
References
- S. Gilbert, N. Lynch, ACM SIGACT News 2002, 33(2), 51–59.
- J. Dean, S. Ghemawat, Proc. OSDI 2004, 137–150.
- D. Ongaro, J. Ousterhout, Proc. USENIX ATC 2014, 305–319.
Textbooks
- Modern Operating Systems, Andrew S. Tanenbaum, Herbert Bos (Pearson, 5th ed. 2022). Classic OS text.
Related topics
Blockchain and distributed ledgersComputer security fundamentals (CIA triad)Cloud computingHash functions and digital signaturesVirtualisation and containersWeb development: front end and back endFile systems and storageSearch engines and PageRankPipelining and parallel processorsComputer vision and convolutional neural networks