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

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 01 · System Design · The stall gets famous · about 20 min to read

Watch: Replication: the copy clerks
▶ VideoPlay it as a journeyTutor comes with a plan

The copy clerks (database replication)

The Copy Clerks
The Copy Clerks · Open board

The fourth episode of the System Design spine, and the one that closes the track’s oldest cliffhanger. The first episode left the chai stall with a single register and called it a future bottleneck. This is the future.

Before you start. You need the chai stall the first episode built, which grew from one counter into several, and the slip rail from The order slip rail (queues & the utilization cliff), which let the counter hand work to the kitchen without waiting for it. Both copied the people. Nothing has yet copied the register, the one book every stall writes its tabs and prices into, and that book is what this lesson is about.

Lesson 4 of 115 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.

See plansAlready a member? Sign in

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

In this lesson

  • One book, and the two ways it kills you
  • May 2000: hire clerks, replication, a leader and its followers
  • The clerk is a moment behind: replication lag
  • 22:52 UTC, 21 October 2018: 43 seconds cost GitHub a day
  • “It didn’t save”: read-your-writes
  • Measured: one evening, three rules

Terms it explains: replication, leader, followers, read replicas, replication lag, asynchronous replication, failover, Read-your-writes, Synchronous, Asynchronous, Semi-synchronous, one, Single-leader, Multi-leader, Leaderless, Statement-based, WAL/physical, Logical/row-based, eventual consistency, Monotonic reads, Consistent-prefix reads, Choose, Fence.

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