Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

Launch price

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year, or $19.50 for your first year with LAUNCH50, ends 1 Nov, 18:30 UTC.

See plansStart free instead

Module 05 · System Design · Deeper than the interview

Watch: Replication: the copy clerks
▶ Video

What did the database promise? (consistency models)

The Copy Clerks
The Copy Clerks · Open board

The leader, the followers and the lag between them. This lesson goes past the board: it asks what a database is allowed to say while the copies disagree, and gives the answers their engineering names.

Before you start. You need the copies from The copy clerks (database replication): one leader that takes writes, followers that copy it a moment later, and the follower that answers with an old value. You need the cut line from The cut phone line (CAP, done properly) too: a break in the network that leaves machines in groups that cannot talk to each other, which engineers call a partition. There, a copy that cannot reach the others must either answer or refuse. Who holds the pen (consensus & Raft) showed how a majority picks one writer. This lesson is about what readers are promised, not who writes.

Lesson 25 of 73 in System Design

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year, or $19.50 for your first year with LAUNCH50, ends 1 Nov, 18:30 UTC.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • May 2013: an auditor with a notebook
  • The shop with three books, and the auditor’s one question
  • Linearizable: one book, as if the copies did not exist
  • Sequential: one order for everyone, but not the clock’s order
  • Read-your-writes: the cheap promise about you
  • Causal: a reply must never appear before the thing it replies to
  • Eventual: if the writing stops, the copies agree
  • What the auditor was really doing

Terms it explains: partition, acknowledged, promise, linearizable, Sequential, read-your-writes, causal, eventual, History 1, History 2, History 3, History 4.

Lab

You pay your tab at stall A and walk to stall B. What do they say you owe?

Stay on Copy later, press Play next moment fourteen times, then raise Moments the clerks run behind and watch the stale answers count.

Open The copy clerks

Related papers

Review System Design