Chapter Twenty-Two · Problem Sixteen
Object Storage
Keep every object for years, at a price someone will pay. The durability target becomes a sum, the metadata moves away from the bytes, and every change is priced in disks.
"Design a cloud object store: put, get and delete objects of any size in buckets, and effectively never lose one."
Distrust the word "never". Durability is something a store buys, and three copies of everything is easy to say and expensive to run. Chapter 10 asks what a store does when its machines cannot talk. This one asks what each stored byte costs to keep, and you answer in disks and failures a week.
The blocks are all from earlier chapters. Chapter 3's Range, Hash and Directory chooses how the metadata splits, and When One Machine Is Not Enough counts the partitions. Chapter 4's Consistency Models That Come Up gives one row its linearizable promise, and its Quorums lesson is the tool you decline here, with a reason. Chapter 5's Leader Election and Consensus keeps each partition alive, and Leases, Locks and Fencing supplies the conditional write. Chapter 6's Regions and the Arithmetic of Nines supplies failure domains.
The round suits staff candidates, and a senior one can do well in it. Three things carry it. First the durability sum: full copies against erasure coding, which stores pieces and parity, along with the failure domains under both and the cost per stored byte. Then the metadata service, strongly consistent, partitioned by bucket and key, and kept apart from the machines that hold the bytes. Last, the extremes: very large objects, very many small ones, and listing by prefix across them.
Start a 45-minute clock and draw your own store before you read further. When it rings, write one number beside the sketch: how many objects it loses in a year, and how you know. Scope runs to minute 10, First Design to minute 20, Scaling It to minute 30, and fifteen minutes remain for deep dives and curveballs.