Distributed Systems
CAP tradeoffs
Explain the three CAP properties, why a partition forces a choice between refusing and serving stale answers, and how to make that choice for each operation.
What you will be able to do
- Explain what CAP says about consistency and availability during a network partition.
- Decide, for each operation, whether it refuses or serves a possibly stale answer during a partition.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Distributed Systems
- Partial failuresIntermediate · 5 min
Explain why a timed-out remote call has an unknown outcome, and how timeouts, idempotency keys, retries and jittered backoff work together to handle it safely.
- Network partitionsIntermediate · 5 min
Explain how a network partition splits a cluster into groups, why only the side with a majority can commit writes, and how to choose member counts that survive a zone…
- Sequential consistencyIntermediate · 5 min
Explain sequential consistency, where all processes agree on one order that keeps each process's own order, and how it differs from the real-time rule of linearizability.
- Lamport clocksIntermediate · 4 min
Explain Lamport's happened-before relation and the logical clock rule that places causes before effects across machines, without relying on synchronized wall-clock time…
- Vector clocksIntermediate · 5 min
Explain vector clocks, how an entry-by-entry comparison shows whether two versions are ancestors or concurrent, and why concurrent versions must be merged rather than…
- Leader electionIntermediate · 4 min
Explain leader election in Raft, where terms and majority votes allow at most one leader per term, and why a paused old leader still needs a check before it writes.