CMD Guide
HomeSystem DesignCAP Theorem

The Consistency Ladder — Requirement to Rung to Mechanism

Ask a junior "what consistency does this need?" and you get one of two wrong answers: "strong, to be safe" (needlessly slow, and unavailable the moment the network hiccups) or "eventual, to scale" (silently, expensively wrong). The senior move is neither — it's to treat consistency as a ladder and place each feature on the lowest rung that is still correct. This page is the decision layer that sits on top of the guide's CAP, quorum, consensus and CRDT pages: requirement → rung → mechanism.

The consistency ladder from strongest to weakest: Linearizable (latest write always seen; mechanism: consensus, sync leader, or strict W+R>N quorum with read-repair before returning), Causal (cause-before-effect preserved; version vectors), Read-your-writes (you see your own writes; sticky session or read-from-leader), and Eventual (replicas converge once writes stop; async replication, gossip, or CRDTs). An upward arrow marks stronger/more-coordination/CP; a downward arrow marks cheaper/faster/more-available/AP. The rule: ask what a stale read costs, pick the lowest safe rung, name the mechanism.
The consistency ladder from strongest to weakest: Linearizable (latest write always seen; mechanism: consensus, sync leader, or strict W+R>N quorum with read-repair before returning), Causal (cause-before-effect preserved; version vectors), Read-your-writes (you see your own writes; sticky session or read-from-leader), and Eventual (replicas converge once writes stop; async replication, gossip, or CRDTs). An upward arrow marks stronger/more-coordination/CP; a downward arrow marks cheaper/faster/more-available/AP. The rule: ask what a stale read costs, pick the lowest safe rung, name the mechanism.

The rungs, strongest to weakest

Each rung down relaxes a guarantee in exchange for lower latency and higher availability under a partition. You climb up only when a stale or out-of-order read would be wrong; you stay down everywhere else.

RungGuarantee (plain words)Buys you / costs youMechanism to nameUse when
Linearizable (strong)Every read sees the latest write; the system behaves like one single copy in real-time order.Correctness under concurrency; costs coordination latency and availability under partition (CP).Consensus (Raft/Paxos), single-leader sync writes, or a strict quorum W+R>N plus synchronous read-repair before answering — overlap alone buys freshness of acknowledged writes, not real-time orderingStale = wrong: account balance, "sold out", unique-username claim.
CausalCause-before-effect is preserved for everyone; unrelated (concurrent) writes may be seen in different orders.Preserves meaning (a reply follows its parent); stays available under partition.Version vectors / vector clocksComments, chat, collaborative editing.
Read-your-writes / monotonic (session)You always see your own writes, and your reads never go backwards in time.Fixes the jarring "I posted and it vanished"; cheap, client-centric.Sticky sessions, read-from-leader for that userPost-then-view, profile edits, "did my change save?".
EventualIf writes stop, all replicas converge eventually; until then reads may be stale.Lowest latency, highest availability (AP); costs temporary staleness.Async replication, gossip, CRDTs (to converge without conflicts)Like/view counts, feeds, product catalog, DNS.

The decision rule (this is the whole skill)

  1. Cost the stale read. Ask, per feature: "if this read is a few seconds old or out of order, what breaks?" Money, inventory, identity → a lot. A view counter → nothing.
  2. Pick the lowest safe rung. Climb only as high as that cost forces you; every rung up trades away latency and availability.
  3. Name the mechanism. A rung without a mechanism is hand-waving. Linearizable → consensus, a leader path, or strict W+R>N with read-repair before returning; causal → version vectors; read-your-writes → sticky/leader reads; eventual → async + CRDTs. This is what makes the answer defensible under drilling.

The ladder is just the operational face of the CAP trade-off: the top rungs are CP (give up availability under partition to stay correct), the bottom rungs are AP (give up freshness to stay up). Quorums let you tune where you sit — W+R>N moves you most of the way up (a read always overlaps the last acknowledged write), but the top rung additionally needs reads to write back the freshest version before returning (or a leader/consensus path); smaller quorums slide you down.

Worked example — one checkout, three different rungs

The tell of a strong answer is refusing to pick one level for the whole system. A single e-commerce checkout wants three:

One flow, three rungs, each justified by the cost of a stale read. Say that in an interview and you've shown the judgment the question is actually testing.

Traps to avoid

Related: Beyond CAP · CAP in practice (quorums, fencing) · Consensus (Paxos vs Raft) · CRDTs · SQL isolation levels · 2PC vs Saga vs TCC.

🤖 Don't fully get this? Learn it with Claude

Stuck on The Consistency Ladder — Requirement to Rung to Mechanism? Open Claude, copy a block below, and it'll teach you this exact concept — visually and interactively.

🎨 Explain it visually

Build the mental picture, not memorization.

I just read a lesson on **The Consistency Ladder — Requirement to Rung to Mechanism** (System Design) and want to truly understand it. Explain The Consistency Ladder — Requirement to Rung to Mechanism from first principles using ONE vivid real-world analogy and a visual mental model — draw it as ASCII art or a clear step-by-step diagram — with a concrete example using real numbers. Then ask me one question to check I got the mental picture, and wait for my reply. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🤔 Walk me through it (interactive)

Socratic — adapts to where you're stuck.

Teach me **The Consistency Ladder — Requirement to Rung to Mechanism** interactively. Ask me ONE guiding question at a time, wait for my answer, and adapt to my confusion — build the idea with me step by step instead of explaining it all at once. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧪 Quiz me & fix my gaps

Active recall exposes what you missed.

Quiz me on **The Consistency Ladder — Requirement to Rung to Mechanism** with 5 questions, easy to tricky, ONE at a time. Tell me if each answer is right; at the end, explain clearly what I got wrong and why. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧠 Make it stick

Intuition + hook + flashcards for long-term memory.

Help me remember **The Consistency Ladder — Requirement to Rung to Mechanism** for the long term: give the one-sentence intuition, a memorable hook/mnemonic, a tiny worked example, and 3 active-recall flashcards (Q -> A). If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.

📝 My notes