</> 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 1: The Change Is the Outage - Problem Understanding & Clarifications

Executive Summary: We read the prompt for a deployment system at a company with 2,000 services on 100,000 servers, and see why the obvious answer (copy the new build to every machine, restart) skips the actual job. Most production incidents begin with a change, so a deploy system is really a machine for making change safe: progressive, verified and reversible. Six clarifying questions fix the fleet's shape, push CI and feature flags out of scope, and set two speeds: hours with bakes for normal releases, under an hour for emergencies. We also meet Sam, whose release we'll follow through every section.

The interviewer reads from a card:

"Design the system that deploys code to production for a company running about 2,000 services on 100,000 servers in three regions. An engineer merges a change; the system should get it safely onto every machine that runs that service, catch a bad release before most users see it, and roll back in minutes."

The first picture most candidates draw is a loop: for each server, copy the binary, restart the process. It describes the bytes moving and nothing else. Ask an on-call engineer what started their last bad night and the answer is usually a deploy or a config push. Every change is a small, deliberate risk, and this system decides how much of the fleet takes that risk at once and how quickly it can be undone.

Key Insight: Speed and safety are not a trade-off here; they're the same goal once rollback is cheap. If undoing a bad release takes 15 minutes and touches no build system, engineers can ship small changes often, and small changes are easier to judge and safer to revert.

Decomposing the Prompt

Before any questions, break the territory down out loud:

  • What it does: Takes an artifact that's already built and tested, gets it onto the right machines a slice at a time, checks each slice against health signals, and undoes it when the signals say no.
  • Who uses it: 8,000 engineers shipping self-service, on-call engineers who need pause and rollback mid-incident, release managers who declare freezes, and auditors who ask who changed production and who approved it.
  • Why it exists: Change is how the company improves its product and how it breaks it. The system's job is to keep the first and bound the second.
  • How it's used: Mostly unattended. A merge starts a rollout that runs for hours with no human watching, so the decision to stop has to be automatic.

Flowchart: Deploy code to production broken into What (built artifact onto the right machines, a slice at a time, verified, reversible), Who (8,000 engineers, on-call, release managers, auditors), Why (change improves the product and causes outages) and How (unattended rollouts, automatic stop and undo)

Quick check before moving on:


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.