</> MAANG.io
system design · 301

Advanced

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/480 solved 0% complete

Section 9: Break It If You Can - Interviewer Deep-Dive Challenges

Executive Summary: With the rollout loop and the byte path on the board, the interviewer starts asking how it fails. Seven escalations follow, each answered by a decision already made, with its number and the point where it flips.

The pattern for every one: don't redesign. Name the mechanism, give its number, say what would flip it.

Challenge 1: The Release Changes a Database Column

"Suppose r-1432 also renamed a column. What happens?"

What they're really asking: Do you know that a rolling deploy means two versions run at once, against one database?

The model answer: For up to about 3.2 hours, N and N-1 serve side by side on the same tables. A rollback widens that window: when Sam's r-1432 was rolled back at 16:48, zone A1 had run it for over an hour and all of region A for half an hour, and r-1101 would then have to read every row r-1432 wrote. So no release may write anything its predecessor can't read. A rename becomes three releases:

Expand, migrate, contract: Release 1: expand (add new column, write both; backfill) leads to Release 2: migrate (read new column, still write both) leads to Release 3: contract (stop writing old column, then drop it) leads to Schema clean

The drop is a separate schema step that runs only once Release 2, which still writes the old column, is no longer a rollback target. Each release finishes its rollout before the next starts, so every adjacent pair is compatible both ways.

Interviewer: "That's three deploys for a rename."

You: "Three trains instead of one, yes. The alternative is a rollback that corrupts data, and then rollback stops being the cheap button the whole design relies on."

The senior line: "A rolling deploy is a version-skew window. Schema changes go expand, migrate, contract, so N-1 can always read what N wrote."

Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.