Code Room
System designHard
Question
Design an online schema-migration system to alter a 3-billion-row, 2 TB MySQL table that serves 50k QPS, where a naive ALTER TABLE would lock writes for hours. You need to change a column type and add an index with zero downtime and the ability to abort safely if load spikes. How do you perform the change, keep the old and new schemas in sync, and cut over?
What a strong answer looks like
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.