Course
Design Out Loud
System design in 90 sittings. Attempt the problem, then read. Requirements before boxes.
Days 1–7 · Hearing the problem
Install the hour: requirements and numbers before boxes, then a diagram you can redraw. Pastebin is the worked example.
- 01What the interviewer is gradingFacing a senior or staff interview, leave able to separate graded signal (scope, trade-offs, operability) from a technology tour.
- 02Vague problem to requirementsFacing a one-line problem, leave able to lock behavior, constraints, and non-goals before any box is drawn.
- 03Capacity math out loudFacing a blank estimate, leave able to compute QPS, storage, and bandwidth out loud with every assumption visible.
- 04API and data model firstFacing pressure to draw servers, leave able to put endpoints, retention, and the real lookup key down first.
- 05One box, and why it breaksFacing pressure to distribute immediately, leave able to show a correct single box and the first limit that forces a split.
- 06A diagram that survivesFacing a sketch that will not take questions, leave able to redraw context, whiteboard, read path, and write path from memory.
- 07Timed dry run (pastebin)Facing a closed-book timer, leave able to run the pastebin in about 35 minutes with no notes, score it, and file the first design-log entry.
Days 8–28 · First distributed design
Each new box is a fix for a break in the pastebin, not a catalog of tools. Day 28 is a different problem. Do not treat this map as the boxes that mock requires.
- 08The second boxFacing a saturated process, leave able to split a stateless app tier and say where session and file state still sit.
- 09Load balancing and drainingFacing uneven load, leave able to choose balancing, health checks, and drain behavior and what each does to in-flight work.
- 10Cache-aside for the melted readFacing a database melted by reads, leave able to add cache-aside and name the miss path and what must not be cached.
- 11Hot-key stampedeFacing a hot pastebin key, leave able to stop a stampede without treating a TTL as invalidation.
- 12SQL or NoSQL from the broken queryFacing a query the current store cannot serve, leave able to choose SQL or NoSQL from the access pattern and name what you give up.
- 13Replication and the lagging readFacing a durability or read-scale wall, leave able to add replicas and refuse a lagging replica for reads that cannot lie.
- 14Object storage for the bodyFacing large bodies in the database, leave able to move bytes to object storage and name the orphan-object failure.
- 15CDN in front of public bytesFacing origin bandwidth on public reads, leave able to place a CDN and say what stays origin-authoritative.
- 16Queue for work the user does not wait onFacing work that should not block the response, leave able to add a queue and describe the backlog the user can see.
- 17Rate limits and abuseFacing a public write API, leave able to put rate limits and abuse control on the path before the expensive store.
- 18Consistent hashing when nodes changeFacing cache or storage nodes that come and go, leave able to use consistent hashing and say when a fixed slot map is simpler.
- 19Backpressure and load sheddingFacing a dependency slower than arrivals, leave able to apply backpressure or shed load and say who feels it.
- 20Timeouts and retry stormsFacing a slow dependency, leave able to set timeouts and retries so a blip cannot multiply into a storm.
- 21Capacity redo with visible assumptionsFacing a design that only works at the average, leave able to redo the estimate with fan-out and a stated cache-hit assumption.
- 22Noisy neighbor and fairnessFacing tenants on one cluster, leave able to cap a noisy neighbor so one key cannot spend the whole budget.
- 23Read path and write pathFacing one tangled picture, leave able to narrate the read path and the write path as separate sequences.
- 24The order-of-magnitude breakFacing a large jump in traffic, leave able to name the first component that breaks and the fix you would reach for next.
- 25Failure overlay on the pastebinFacing "what if this dies," leave able to overlay one dependency failure and the user-visible result.
- 26End-to-end distributed pastebinFacing a full interview on the spine, leave able to assemble the distributed pastebin in one interview-shaped pass.
- 27Red-team before they doFacing your own finished design, leave able to find the holes a staff interviewer would open and patch the reasoning.
- 28Mock: image upload and thumbnailsFacing an interview problem that is not the pastebin, leave able to design image upload and thumbnails from the product behavior, then log a self-score.
Days 29–49 · Data and consistency
Guarantees, keys, and the failure you accept. The pastebin is still the worked example. Consensus stays a dependency; Raft is appendix reading, not this phase. Day 49 is a different problem. Do not treat this map as the design that mock requires.
- 29The guarantee per operationFacing the word "consistent," leave able to state the guarantee per operation instead of one label for the whole system.
- 30Linearizability and what you refuseFacing a demand for linearizability, leave able to say which operations need it and which you will refuse.
- 31Partition key, hash, and rangeFacing one hot database, leave able to pick a partition key and say what hash versus range gives up.
- 32Hot keys and saltingFacing a celebrity key, leave able to salt or split it without destroying the lookup you still need.
- 33Invalidation and TTLFacing stale or thundering cache entries, leave able to choose invalidation or TTL and the stale window you accept.
- 34Lag, monotonic reads, read-your-writesFacing replica lag, leave able to give the right operations monotonic reads or read-your-writes.
- 35Quorums in plain languageFacing a quorum design, leave able to explain what N, R, and W buy and the unavailable or stale outcome you took.
- 36A leader is a dependencyFacing a single-writer partition, leave able to treat leader election as a dependency with an unavailable window, not as a protocol lecture.
- 37Idempotency on an at-least-once pathFacing retries, leave able to make an at-least-once write safe with idempotency keys and name what can still arrive twice.
- 38Dedupe and the inboxFacing a consumer that can see a message twice, leave able to dedupe with an inbox and a defined retention for those keys.
- 39Outbox, not dual writeFacing a write that must also become a message, leave able to replace a dual write with an outbox.
- 40Transactions that stop at the shardFacing a multi-row change, leave able to draw the transaction at one shard and pick an isolation level on purpose.
- 41Sagas and compensationFacing a workflow that crosses partitions, leave able to use a saga and name the compensation and the crash window.
- 42Conflicts you can explainFacing two writers, leave able to choose versions, last write, or a merge, and say when a CRDT is worth naming.
- 43Active-passive or active-activeFacing users in more than one region, leave able to choose a write topology and the conflict or failover cost that comes with it.
- 44Clocks, ids, and orderFacing order across machines, leave able to pick ids and a clock story and name the reorder bug you still have.
- 45Schema change and backfillFacing a schema that must change, leave able to plan expand, backfill, and cutover without stopping writes, plus a rollback.
- 46Delete, tombstone, retentionFacing a delete, leave able to use tombstones and retention so replicas and indexes do not resurrect the row.
- 47Secondary indexes and data-path costFacing an extra index or replica, leave able to state the write amplification, storage class, or egress you just bought.
- 48Close the data chapterFacing the end of the data section, leave able to close on guarantee, partition plan, and the failure you accept.
- 49Mock: warehouse inventory reservationFacing a problem that is not this week's schema, index, or retention lesson, leave able to reserve inventory so two buyers cannot take the last unit, then log…
Days 50–77 · Product-shaped systems
One product a day, or a variant whose failure mode is new. Inventory on day 49, assigned seats on day 61, and a flash-sale queue on day 70 are three different problems. Ranking models stay out.
- 50URL shortenerFacing a redirect path, leave able to design create and redirect so a hot link cannot pin one row or one cache key.
- 51News feedFacing a home feed, leave able to choose fan-out-on-write or fan-out-on-read from follower skew, with ranking models left out.
- 52Celebrity fan-outFacing one author with a huge audience, leave able to hybrid-fan-out so a single post cannot stampede storage or the online cluster.
- 53One-to-one chatFacing two people messaging, leave able to keep per-conversation order, receipts, and offline catch-up without a global total order.
- 54Large-room chatFacing a huge room, leave able to serve history and fan-out without copying every message to every member on the send path.
- 55NotificationsFacing a user who is not in the app, leave able to design push plus an inbox with preferences, dedupe, and a dead provider.
- 56TypeaheadFacing a prefix box, leave able to serve suggestions from a popularity-biased index and bound how stale a suggestion may be.
- 57Product searchFacing catalog search rather than a prefix, leave able to query an inverted index with facets and explain lag after a write.
- 58Video on demandFacing a long video, leave able to take upload through transcode to CDN playback without bytes sitting on the app tier.
- 59Live videoFacing a live stream, leave able to ingest with adaptive bitrate and survive the stampede when the stream starts.
- 60NearbyFacing "what is near me," leave able to index points, bound staleness, and avoid leaking a precise location.
- 61Ticket bookingFacing assigned seats, leave able to hold specific seats with a TTL so you neither oversell nor lock the whole venue.
- 62Metrics ingestionFacing a firehose of measurements, leave able to ingest points with a cardinality limit so one tenant cannot blow the store.
- 63Mock: job schedulerFacing an unseen problem, leave able to design a job scheduler with leases, missed fires, and duplicate runs, not this week's search, video, location, ticket,…
- 64Metrics query and alertsFacing graphs and pages rather than ingest, leave able to query downsampled series and stop one alert rule from paging on every blip.
- 65PaymentsFacing money movement, leave able to authorize and capture against an idempotent ledger so a retry cannot move money twice.
- 66Payment reconciliationFacing a provider and a ledger that disagree, leave able to find the mismatch and repair it without a silent rewrite of history.
- 67Collaborative documentFacing two editors in one document, leave able to persist concurrent edits and presence and say what you do when they diverge.
- 68File syncFacing folders that must match across devices, leave able to sync chunks, resolve conflicts, and survive a client clock that lies.
- 69Cart and checkoutFacing a purchase, leave able to snapshot price and hold stock so a retry cannot double-charge or double-commit inventory.
- 70Flash saleFacing an arrival spike on scarce stock, leave able to queue buyers with a fairness rule instead of letting them pile onto the database.
- 71Social graphFacing follow and block, leave able to store the graph so a privacy check stays correct on the read path.
- 72Ephemeral storiesFacing posts that must disappear, leave able to fan them out with a TTL that is real in storage and caches, not only in the UI.
- 73Web crawlerFacing the public web as input, leave able to run a polite frontier with dedupe and freshness so one host is not melted.
- 74Order bookFacing buy and sell orders, leave able to match one instrument on a single sequence and rebuild the book after the matcher crashes.
- 75Feature flagsFacing a risky rollout, leave able to serve a flag or kill switch at low latency and bound how stale a client may be.
- 76Audit logFacing "who did that," leave able to append a queryable activity log with retention and a tamper claim you can actually keep.
- 77Mock: email inboxFacing an unseen product, leave able to design a large email inbox (ingest, folders, search, attachments), not this week's graph, stories, crawler, book,…
Days 78–84 · Failure and senior signal
Staff credit is the failure you can operate, pay for, and migrate. Day 84 is a product mock with a scripted outage, not a repeat of these lectures.
- 78SLOs and the miss a user seesFacing a vague reliability ask, leave able to state an SLO and the user-visible miss when it is breached.
- 79Degradation under partial failureFacing a sick dependency rather than a total outage, leave able to pick a degraded mode and what you refuse to drop.
- 80Losing a regionFacing a region that is already dark, leave able to state RPO, RTO, and which side is authoritative for new writes.
- 81Observability that pages a humanFacing an on-call question, leave able to name the dashboard, the page, and the first runbook step for a failure you designed.
- 82Cost as a spoken trade-offFacing a design that is correct and expensive, leave able to cut replicas, egress, or retention and say the user-visible risk.
- 83Migration while liveFacing a system that must change shape, leave able to migrate with a dual path and a rollback while writes continue.
- 84Mock: delivery dispatch with a late failureFacing a dispatch problem that is not an SLO or migration lecture, leave able to design matching and, near minute 25, lose a region or the location store.
Days 85–90 · Mocks and the kit
Three full interviews: read-heavy, write-heavy, realtime. Debriefs are their own days. Day 90 is kit-run: no lesson beside the timer. The kit is optional; use the lobby fallback if you do not own it.
- 85Kit hookup and the design logFacing the last mocks without a shared ritual, leave able to run a timer, the senior rubric, and a design log, and see where the separate kit plugs in.
- 86Mock: article serving (read-heavy)Facing a read-heavy problem that is not the kit-setup lesson, leave able to design article serving with hot pages and invalidation on publish, inside the time…
- 87Debrief: read-heavy mockFacing the day-86 writeup, leave able to score it on the senior rubric and rewrite only the weakest section into the design log.
- 88Mock: event intake (write-heavy)Facing a write-heavy problem, leave able to design event intake with dedupe, late events, and a durable sink, and leave a complete design-log entry.
- 89Debrief: write-heavy mockFacing the day-88 writeup, leave able to score it, compare it with day 86, and log the one staff-level gap to close before the final mock.
- 90Mock: realtime lobby (kit run)Facing a realtime interview with no lesson beside it, leave able to run the kit's current problem (fallback: multiplayer lobby) and leave the design log as…
Start
- Start here1. Set a timer. 2. Attempt the problem on [Day 1](days/01-what-the-interview-is-grading.md). Do not scroll past the attempt line. 3. Then read.
- How to study1. Set a timer. 2. Attempt the problem. Stop at the attempt line. 3. Then read.
- ChecklistPrint this page, or copy the lines into your notes. A tick in the browser is not saved. Nothing here is shared progress, and nothing should be committed back…
Problem bank
- Problem bankThis folder is the problem bank. The directory is still named `prompts/` so existing links keep working. Closed-book problems live here, one file per mock. A…
- Article servingClosed-book card for day 86. This file is the interviewer. It is not a worked example.
- Delivery dispatchClosed-book card for day 84. This file is the interviewer. It is not a worked example.
- Email inboxClosed-book card for day 77. This file is the interviewer. It is not a worked example.
- Event intakeClosed-book card for day 88. This file is the interviewer. It is not a worked example.
- Image upload and thumbnailsClosed-book card for day 28. This file is the interviewer. It is not a worked example.
- Job schedulerClosed-book card for day 63. This file is the interviewer. It is not a worked example.
- Multiplayer lobbyClosed-book fallback card for day 90 when you are not using a separate kit realtime card. This file is the interviewer. It is not a worked example.
- PastebinClosed-book card for day 7. This file is the interviewer. It is not a worked example.
- Warehouse inventory reservationClosed-book card for day 49. This file is the interviewer. It is not a worked example.
Tools
- Diagram stencilsSix types, used the same way every day. Week 1 fills them for the pastebin on [day 6](../days/06-a-diagram-that-survives.md). Later days only mark them up. If…
- Design logThe log is the artifact. There is no certificate.
- Design log entryCopy this file into your own notes. Do not fill it in on the template itself.
Appendices
- Appendices (optional)Not part of the 90 days. Not a mock. Do not swap one in because a lesson feels unfinished, and do not open one in the middle of a timed mock.
- Classic papersUnder 40 minutes **per paper**, or skip until an interview is on the calendar. Do not read all three the night before a mock instead of sleeping.
- Company quirks35 minutes for the whole table, or 10 minutes on the one company you are walking into.
- Dynamo (appendix)Leave able to use **consistent hashing**, **sloppy quorum**, **hinted handoff**, and **application-level conflict handling** when the interviewer forbids a…
- Raft (appendix)Leave able to treat consensus as a **bought dependency**: one writer per shard, a replicated log, and a bounded time with no writer. Leave unable to spend the…
- Spanner (appendix)Leave able to say **external consistency** and **why a multi-region transaction costs latency and availability**, without inventing a clock protocol on the…
Watch
System Design: Architecting Scalable LLM Inference for AI AppsSystem Design: Architecting Scalable LLM Inference for AI Apps
10 million daily users. How many requests per second? | 05 #systemdesign10 million daily users. How many requests per second? | 05 #systemdesign
Earliest reset replays attention | 04 #kafka #kafkainternals #courseEarliest reset replays attention | 04 #kafka #kafkainternals #course
Memory, disk and network differ by thousands of times | 04 #systemdesignMemory, disk and network differ by thousands of times | 04 #systemdesign
A partition is just files on disk | 03 #kafka #internals #courseA partition is just files on disk | 03 #kafka #internals #course
Percentiles | 03 #systemdesign #fundamentals #firstprinciplePercentiles | 03 #systemdesign #fundamentals #firstprinciple