Changing a live system: migrations, backfills and dual writes
A family moves to a bigger house without taking a day off. Movers carry boxes across all week while life goes on in the old house, where shopping arrives and things get thrown away. A list on the fridge records everything bought or binned since the first van left. The movers never unpack a box over something already put away from the list, and a "binned" note stops them bringing back the broken lamp. They check the new house room by room, then the family sleeps there, then the post is redirected, and they keep the old keys for a week.
The old house is the old store, still the source of truth, and the new house is the new one: shards, a new schema or another database. The boxes are the backfill, the fridge list is a change stream started before the first box, and the "binned" note is a tombstone. The room-by-room check compares checksums per key range, sleeping there is moving reads, redirecting the post is moving writes, and the old keys are a stream running back for rollback. Interviewers ask how you'd get from today's design to that one, and listen for steps each safe to undo. The move: keep the old store as the truth while you copy, feed the new one every change in order, prove they match, then move reads before writes, with a way back at each step.