Quorums
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Quorums and leaderless replication: the 60-second story

    Quorums and leaderless replication

    Three credit notebooks, no master copy. She moves on when two confirm.

    To check a balance, she calls two and trusts the later entry. No leader; just counting replies.

    Write waits for 2 of 3. Read asks 2. They overlap.

    R + W > N, so any two replicas you read include one that took the write. The reader keeps the newest version.

    3 ms

    write reply at W = 2, not 40 ms

    A request is as slow as its W-th fastest replica, so slow D costs nothing. Dynamo’s common setting is (3, 2, 2).

    Mumbai + Frankfurt, 3 replicas each. Which quorum?

    Bad: QUORUM: 4 of all 6

    Always crosses the WAN; fails without Frankfurt.

    Good: LOCAL_QUORUM: 2 of 3 local

    Read your own writes locally; a remote region can vanish.

    One clock runs 3 s fast. The newer write silently loses.

    Last-write-wins keeps the highest timestamp, not the latest event. Both writes are acknowledged; “delivered” just vanishes.

    Copies drift. Three repairs, one deadline.

    1. Read repair: fix what a read touches
    2. Hinted handoff: replay a down node’s writes
    3. Merkle trees: stream only ranges that differ
    4. Repair every node within 10 days, or deletes return

    A partition hides home replicas B, C, D. Stand-ins E and F take the write, holding hints.

    The catch

    A sloppy quorum. 2 + 2 > 3, yet reading B and C returns the old value.

    Two buyers, one seat, both told “success” at QUORUM.

    Both read C14 free; last-write-wins keeps one name, no error. Check-then-set needs a lightweight transaction, Paxos, ≈ 4 round trips.

    Remember

    Write to all N, reply after W acks; read R and keep the newest. R + W > N makes them overlap. Repair instead of failover, and a lightweight transaction for check-then-set.