Distributed data
On this page 9 topics
Overview
Topics
- Consensus concepts
- quorum
- replication
- consistency models
Learn first
3.5 h of practice (estimate)
Learning outcomes
- Explain leader-based, multi-leader, and leaderless replication and their failure behavior.
- Explain consensus (Raft) at the level needed to evaluate systems that use it (etcd, Kafka KRaft, distributed SQL).
- Reason about quorums and tunable consistency.
- Evaluate a datastore's consistency claims against published analyses (e.g., Jepsen).
Lessons
Lab and exercises
Lab
SRB-003-LAB1 · Datastore evaluation
Outcomes: 1, 2, 3, 4 · Time: ~3.5 h
- State FulfillCo's stock ledger requirements (no oversell, multi-warehouse, failure tolerance).
- Pick two candidate datastores and document their replication and consistency models.
- Gather evidence: documentation, Jepsen findings, or a small partition experiment.
- Write a comparison and recommendation with caveats.
Acceptance: every consistency claim backed by documentation, Jepsen findings, or experiment; recommendation stated.
Exercises
| ID | Outcome | Task |
|---|---|---|
| SRB-003-EX01 | 1 | A leader fails with asynchronous replication. Describe what is lost and how to limit it. |
| SRB-003-EX02 | 2 | A 5-node cluster splits 3/2. Which side accepts writes and why? |
| SRB-003-EX03 | 3 | N=5. Choose W and R for a stock ledger and justify, then list one failure scenario to test. |
| SRB-003-EX04 | 3 | Show that W=1, R=1 with N=3 can return stale data. |
| SRB-003-EX05 | 4 | Find the version tested in a Jepsen report for a store you know and list the findings relevant to you. |
| SRB-003-EX06 | 4 | A vendor claims 'strong consistency, always available'. Write three questions to test it. |
Show solutions
- EX01 Writes not yet replicated; reduce with synchronous or semi-synchronous replication at a latency cost.
- EX02 The 3-node side holds a majority; the 2-node side cannot commit.
- EX03 W=3, R=3 (overlap); test slow node plus sloppy quorum or concurrent writers.
- EX04 The write lands on replica A, the read hits replica B which has not received it.
- EX05 Answers depend on the report; must cite version, configuration, anomaly, and whether it is fixed.
- EX06 Under which partition? Which configuration? Which published analysis or test supports it? Also: what happens to minority-side clients?
Workplace evidence: a datastore decision you informed with consistency analysis.
Quiz
Outcomes: O1 replication · O2 consensus · O3 quorums · O4 evaluating claims.
A self-check for you: nothing is graded, saved or sent anywhere. Choose an answer, then check it. You can try again as often as you like.
Practical part
Scenario quiz plus a short written evaluation of the lab's two datastores. Pass: 70% on the quiz and every claim in the evaluation backed by evidence.
Common mistakes
Trusting marketing consistency claims; quorum math without failure scenarios.
Assessment
Scenario quiz.
Workplace evidence
A datastore decision you informed with consistency analysis.
Career relevance
Multi-region trade-offs (SRA-005).