The System Design Interview Ramp — the data-infra loop
A focused path for the data-infra interview loop: learn by operating the systems, not memorizing boxes. The foundations, the storage-streaming-query core, the concurrency & Python internals underneath, the low-level and object-oriented design, interview craft, and timed rehearsal — every stop an interactive, animated explainer. The AI-infra loop and the product classics have their own routes.
Phase 1 — Foundations first
The numbers, primitives, and habits every design leans on. Build these and the systems above stop feeling like memorization.
- The System Design Cheat Sheet — The arc of the round, the block menu, the decision tables, and the invariants — one page that turns every prompt below into a variation you already know.
- 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.
- 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
The data-infrastructure spine — fourteen full high-level designs, start to finish. Each drills a different muscle the rubric grades; together they cover the storage, streaming, and query question space a data-platform loop pulls from.
- Design a Distributed Message Queue — The classic opener: how services hand work to each other through a queue that never loses a message — and what happens when consumers can’t keep up.
- Design a Durable Key-Value Store — How a database keeps the promise that saved data survives a crash — one idea, a log written before anything else, carries the whole design.
- Two Writers, One Row — Two writers, one row, one room left — the double-booking race, and the three defenses (lock, version check, constraint) every reservation and payment path picks from.
- Design S3-Like Object Storage — How cloud storage makes losing a file a once-in-ten-million-years event — even when an entire data centre dies.
- Design a Transaction Log on Object Storage — ACID on a bucket: an ordered log of commits turns files-on-S3 into a database. Writers race, the loser rebases — the data-infra interview’s favorite question.
- How Google Spanner Works — The capstone: a database spread across the planet that still behaves like one machine — built on a clock that admits its own uncertainty.
- Design a Stream Processor with Exactly-Once — How a system that counts events in real time can crash, recover, and still never count anything twice.
- Design a Distributed Cache — One celebrity post pulls 300k requests a second at a single cache server — the melt-down, and the three-part defence.
- Design a DAG Job Scheduler — Run scheduled jobs so no crash loses one and no overlap runs one twice — the machinery behind every pipeline tool.
- Design a Metrics & Monitoring System — Why billions of measurements a day need their own kind of database — and the compression tricks that make it fit.
- Design Ad-Click Aggregation (Lambda vs Kappa) — Count a billion clicks two ways at once: a dashboard fresh within seconds, beside totals accurate enough to bill against.
- Design a Multi-Tenant Query Engine on Object Storage — Thousands of customers on one fleet of borrowed machines — scheduling fairly, and surviving machines taken back mid-query.
- The Shuffle: How a Cluster Moves a Join — How a cluster moves a join: the every-to-every exchange, the hot key that strands one straggler, and the adaptive split that saves the wall clock.
- Top-K & Heavy Hitters — Leaderboards exactly, firehoses approximately — the sorted set, then the count-min sketch that counts a billion keys in a kilobyte.
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, and the object-oriented design round — narrated as you write it. The craft the deep-dive, coding, and OOD rounds actually grade.
- 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.
- The OOD Interview, Decoded — The OOD round decoded: nouns to objects, invariants out loud, the four patterns that actually appear — and the state machine hiding in every classic.
- Three OOD Classics, Worked — The three OOD prompts that show up most, worked end to end — the parking lot’s graded decisions, and the reveal that the vending machine and elevator are one state machine you can drive live.
- 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.
Phase 5 — Run the room
Reading a design and giving one are different skills, and only the second is on the exam. This is where you close the book and rehearse the answer out loud, on a clock.
- How to Design a System in 60 Minutes — The four-phase clock every HLD runs on — scope, high-level and buy-in, deep dives, wrap. The spine you rehearse against.
- The Prompt Bank — Twenty prompts stated the way an interviewer opens, with the answer hidden until you’ve attempted it. Where the reading turns into reps.
- The Behavioral Interview, Decoded — The other half of the loop: fit and level, read from your stories through four dimensions — scope, contribution, impact, difficulty.
- Stories That Carry Signal — Interviewers keep notes, not transcripts. Headline first, three key moments, six shelves of depth — prune everything they wouldn’t write down.
- The Story Bank — Six to eight true stories covering nine question families — build the coverage matrix, find your gaps, rehearse out loud.