The System Design Interview Ramp — a visual roadmap
A phased path through the whole atlas: learn by operating the systems, not memorizing boxes. Foundations, nine full high-level designs, concurrency & Python internals, and interview craft — every stop an interactive, animated explainer.
Phase 1 — Foundations first
The numbers, primitives, and habits every design leans on. Build these and the systems above stop feeling like memorization.
- Back-of-the-Envelope: the Numbers That Design Systems — Every design starts with arithmetic — turn users and payloads into QPS, storage, and cache before you draw a single box.
- How to Design a System in 60 Minutes — The four-phase clock you run every HLD on. Learn the spine first; every system below hangs off it.
- From One Server to Millions of Users — Watch each bottleneck force the next move — split, replicate, cache, shard. The map every "design X" answer walks.
- Consistent Hashing — The ring that moves only ~1/N of keys on a membership change — the primitive under caches, shards, and queues.
- Consistency, Quorums & CAP — W+R>N, and the consistency-vs-availability choice you only face during a partition. The vocabulary for every replication trade-off.
- Rate Limiting: Four Algorithms, Honestly Compared — Token vs leaky vs window, one burst replayed through all four — the admission control you bolt onto every API.
- Unique IDs at Scale — Why auto-increment dies the moment you shard, and the 64-bit Snowflake that replaces it with no coordination.
- Idempotency & the Exactly-Once Illusion — Exactly-once delivery is impossible; idempotent effects are not. The property that makes every retry safe.
Phase 2 — The core systems
Nine full high-level designs, start to finish. Each one drills a different muscle the rubric grades — together they cover the question space.
- Design a Distributed Message Queue — The canonical HLD: partitions, replication, delivery semantics, back-pressure — the muscle for decoupling services.
- Design a Durable Key-Value Store — Append before apply, fsync, replay-on-recovery. The write-ahead log is the whole durability story, drawn.
- Design S3-Like Object Storage — Metadata/data split, erasure coding, placement across failure domains — designing honestly for eleven nines.
- Design a Stream Processor with Exactly-Once — Checkpoint barriers, watermarks, a two-phase-commit sink — stateful compute that survives a crash without double-counting.
- Design a Distributed Cache — A celebrity key at 300k requests a second melts one shard — detection, replication, and stampede protection.
- Design a DAG Job Scheduler — SKIP LOCKED, heartbeats, fencing tokens — active-active scheduling that never loses or double-runs a job.
- Design a Metrics & Monitoring System — The append-only TSDB, delta-of-delta + XOR, and the cardinality bomb that decides whether it fits in RAM.
- Design Ad-Click Aggregation (Lambda vs Kappa) — Lambda vs Kappa, idempotent dedup, late-event restatement — a seconds-fresh dashboard beside billing-grade totals.
- Design a Multi-Tenant Query Engine on Object Storage — Control/data-plane split, fair scheduling, and a query that survives its own executors being reclaimed mid-flight.
Phase 3 — Down the stack — concurrency & Python
The concurrency and Python the deep-dive and coding rounds probe once the boxes are drawn. Read the real source, not a summary.
- Threads, Locks & the Anatomy of a Race — Share memory between two threads and the interleavings explode — the lost update, then holding the invariant with a lock.
- The GIL, Honestly — One mutex, yet x += 1 still races. Pick threading, multiprocessing, or asyncio from a computed wall-clock.
- CPython’s queue.py, Line by Line — The real bounded blocking queue: one mutex, three Conditions, the not-empty / not-full invariants, walked top to bottom.
- functools.lru_cache, Line by Line — The canonical "build a thread-safe LRU" answered in production Python — the circular linked list and the one RLock.
- A Write-Ahead Log You Can Implement in an Hour — The low-level-design round, coded: a ~120-line crash-safe log you can author, crash in a child process, and replay.
- Python’s Dict, Under the Hood — Open addressing, the perturb probe sequence, and the compact layout that made insertion order a language guarantee.
- Iterators, Generators & the Dunder Protocols — Desugar the for-loop into iter / next / StopIteration and watch a generator freeze mid-frame on yield.
- Python Gotchas That Fail Interviews — Eight snippets that look obvious and aren’t — the one evaluation-model rule under mutable defaults and late binding.
Phase 4 — Craft in the room
What separates a correct answer from a trusted one: clean interfaces, honest errors, idiomatic code — narrated as you write it. The 60-minute method is the spine running through all four phases.
- Writing Python Interviewers Trust — One problem solved twice — the rushed version vs the trustworthy one, as six trust signals you can name and practise.
- Idiomatic Python — The same program with a C accent and the way Python wants it — comprehensions, EAFP, dataclasses, and when NOT to.
- Designing a Clean Python API Under Pressure — The LLD round grades your interface: derive the API from the call site, state the invariants, shape the exception surface.
- Errors, Edge Cases & Testing in the Room — Juniors code the happy path; seniors enumerate what breaks — the edge-case checklist and a five-minute self-test.