Replication: the copy clerks
Vertical version.
Chapters
Narration
Every wala walks to one register. That register is a single database, and it is two problems wearing one coat. It is the bottleneck every read must pass through, and it is the one place all of your data can die at once. So one book alone accepts changes, and clerks copy every new line into books of their own. Writes go to the leader. Reads, which are almost all of the traffic, spread across the copies. But a copy is always a moment behind. You save your name, the leader has it, and your very next read lands on a clerk who has not been told yet. The page shows the old value, and you assume it failed. When the leader is allowed to call a write done is a dial. Wait for a copy and nothing is ever lost, but every write pays a round trip. Answer straight away and a crash takes the last writes with it. And copies only ever scale reads. Every clerk still receives every change, so ten clerks do each write ten times over. Read capacity multiplies. Write capacity has not moved at all. Then the leader dies, and two hard questions arrive together. Which copy is the most complete, because promoting a lagging one quietly deletes committed writes. And how do you stop the old leader waking up still believing it holds the pen. Once truth has been copied, you stop getting both. Answer instantly, or answer perfectly. Every consistency guarantee you will ever read about is a small, targeted repair of that one trade.
Based on the board The Copy Clerks.
Try it in the lab: The copy clerks.
Related papers: Dynamo: Amazon's Highly Available Key-value Store, Time, Clocks, and the Ordering of Events in a Distributed System, Scaling Memcache at Facebook and Conflict-free Replicated Data Types.
Covered in KV: quorum, The copy clerks (database replication), What did the database promise? (consistency models), Backups and the day you need them (RPO, RTO, and the restore nobody tested), Compute on borrowed disks: disaggregated storage.
Saved in this browser, and to your account when you sign in.