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: CAP: the cut phone line
▶ Video

Two kitchens, two cities (multi-region and active-active)

The Cut Phone Line
The Cut Phone Line · Open board

The cut line between two books. That board cuts the line inside one setup. This lesson cuts it between two whole cities and asks what a company does when the building holding everything goes dark.

Before you start. You need The cut phone line (CAP, done properly): when the wire between two copies of the data goes quiet, a clerk can only answer from her own book (and risk being stale) or refuse until she can check. You need The copy clerks (database replication), where a second book copies from the first and runs a moment behind (lag), and Splitting the ledger (sharding), where the records were cut across more than one book. Every other word here is shown working before it is named.

Lesson 24 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

  • 24 December 2012: Netflix goes dark on Christmas Eve
  • One building is a bet: a region and what it takes down
  • The spare kitchen: failover and active-passive
  • Both kitchens cook: active-active
  • The price of distance: why the two books cannot be one
  • Both kitchens changed the same order: conflict resolution

Terms it explains: region, failover, active-passive, active-active, conflict resolution, last writer wins, synchronous, asynchronous, Run the script above, Do the distance sum, List what you own, availability, CAP, consistency (linearizable), eventual consistency, PACELC, partition, tunable consistency.

Lab

The line between the branches is cut. What does the far clerk say to the customer in front of them?

Pick Answer anyway, press Play next moment through all fourteen, and watch The bill so far count conflicting entries.

Open The cut phone line

Two cities changed the same order a moment apart. Which change survives, and what did it cost to be sure?

Pick Answer now, latest stamp wins, drag The west kitchen's clock to right on time, and watch Wrong change kept.

Open Two kitchens, two cities

Related papers

Review System Design