Two kitchens, two cities (multi-region and active-active)
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.
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.