reason from

Course

Design Out Loud

System design in 90 sittings. Attempt the problem, then read. Requirements before boxes.

90 lessons are written. The arc is 90 days. One sitting is a day. Attempt before you read.

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.

  1. 0135 minWhat the interviewer is gradingFacing a senior or staff interview, leave able to separate graded signal (scope, trade-offs, operability) from a technology tour.
  2. 0235 minVague problem to requirementsFacing a one-line problem, leave able to lock behavior, constraints, and non-goals before any box is drawn.
  3. 0340 minCapacity math out loudFacing a blank estimate, leave able to compute QPS, storage, and bandwidth out loud with every assumption visible.
  4. 0435 minAPI and data model firstFacing pressure to draw servers, leave able to put endpoints, retention, and the real lookup key down first.
  5. 0540 minOne 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.
  6. 0635 minA diagram that survivesFacing a sketch that will not take questions, leave able to redraw context, whiteboard, read path, and write path from memory.
  7. 0735 minTimed 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.

  1. 0835 minThe second boxFacing a saturated process, leave able to split a stateless app tier and say where session and file state still sit.
  2. 0935 minLoad balancing and drainingFacing uneven load, leave able to choose balancing, health checks, and drain behavior and what each does to in-flight work.
  3. 1040 minCache-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.
  4. 1135 minHot-key stampedeFacing a hot pastebin key, leave able to stop a stampede without treating a TTL as invalidation.
  5. 1235 minSQL 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.
  6. 1340 minReplication 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.
  7. 1440 minObject storage for the bodyFacing large bodies in the database, leave able to move bytes to object storage and name the orphan-object failure.
  8. 1535 minCDN in front of public bytesFacing origin bandwidth on public reads, leave able to place a CDN and say what stays origin-authoritative.
  9. 1635 minQueue 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.
  10. 1735 minRate limits and abuseFacing a public write API, leave able to put rate limits and abuse control on the path before the expensive store.
  11. 1835 minConsistent 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.
  12. 1935 minBackpressure and load sheddingFacing a dependency slower than arrivals, leave able to apply backpressure or shed load and say who feels it.
  13. 2035 minTimeouts and retry stormsFacing a slow dependency, leave able to set timeouts and retries so a blip cannot multiply into a storm.
  14. 2140 minCapacity 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.
  15. 2235 minNoisy neighbor and fairnessFacing tenants on one cluster, leave able to cap a noisy neighbor so one key cannot spend the whole budget.
  16. 2335 minRead path and write pathFacing one tangled picture, leave able to narrate the read path and the write path as separate sequences.
  17. 2435 minThe 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.
  18. 2535 minFailure overlay on the pastebinFacing "what if this dies," leave able to overlay one dependency failure and the user-visible result.
  19. 2640 minEnd-to-end distributed pastebinFacing a full interview on the spine, leave able to assemble the distributed pastebin in one interview-shaped pass.
  20. 2740 minRed-team before they doFacing your own finished design, leave able to find the holes a staff interviewer would open and patch the reasoning.
  21. 2835 minMock: 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.

  1. 2935 minThe guarantee per operationFacing the word "consistent," leave able to state the guarantee per operation instead of one label for the whole system.
  2. 3040 minLinearizability and what you refuseFacing a demand for linearizability, leave able to say which operations need it and which you will refuse.
  3. 3140 minPartition key, hash, and rangeFacing one hot database, leave able to pick a partition key and say what hash versus range gives up.
  4. 3240 minHot keys and saltingFacing a celebrity key, leave able to salt or split it without destroying the lookup you still need.
  5. 3335 minInvalidation and TTLFacing stale or thundering cache entries, leave able to choose invalidation or TTL and the stale window you accept.
  6. 3440 minLag, monotonic reads, read-your-writesFacing replica lag, leave able to give the right operations monotonic reads or read-your-writes.
  7. 3535 minQuorums in plain languageFacing a quorum design, leave able to explain what N, R, and W buy and the unavailable or stale outcome you took.
  8. 3635 minA 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.
  9. 3740 minIdempotency 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.
  10. 3835 minDedupe 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.
  11. 3935 minOutbox, not dual writeFacing a write that must also become a message, leave able to replace a dual write with an outbox.
  12. 4040 minTransactions 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.
  13. 4140 minSagas and compensationFacing a workflow that crosses partitions, leave able to use a saga and name the compensation and the crash window.
  14. 4240 minConflicts you can explainFacing two writers, leave able to choose versions, last write, or a merge, and say when a CRDT is worth naming.
  15. 4340 minActive-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.
  16. 4435 minClocks, ids, and orderFacing order across machines, leave able to pick ids and a clock story and name the reorder bug you still have.
  17. 4540 minSchema change and backfillFacing a schema that must change, leave able to plan expand, backfill, and cutover without stopping writes, plus a rollback.
  18. 4640 minDelete, tombstone, retentionFacing a delete, leave able to use tombstones and retention so replicas and indexes do not resurrect the row.
  19. 4735 minSecondary indexes and data-path costFacing an extra index or replica, leave able to state the write amplification, storage class, or egress you just bought.
  20. 4840 minClose the data chapterFacing the end of the data section, leave able to close on guarantee, partition plan, and the failure you accept.
  21. 4935 minMock: 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.

  1. 5035 minURL shortenerFacing a redirect path, leave able to design create and redirect so a hot link cannot pin one row or one cache key.
  2. 5140 minNews 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.
  3. 5235 minCelebrity 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.
  4. 5340 minOne-to-one chatFacing two people messaging, leave able to keep per-conversation order, receipts, and offline catch-up without a global total order.
  5. 5440 minLarge-room chatFacing a huge room, leave able to serve history and fan-out without copying every message to every member on the send path.
  6. 5540 minNotificationsFacing a user who is not in the app, leave able to design push plus an inbox with preferences, dedupe, and a dead provider.
  7. 5635 minTypeaheadFacing a prefix box, leave able to serve suggestions from a popularity-biased index and bound how stale a suggestion may be.
  8. 5740 minProduct searchFacing catalog search rather than a prefix, leave able to query an inverted index with facets and explain lag after a write.
  9. 5840 minVideo on demandFacing a long video, leave able to take upload through transcode to CDN playback without bytes sitting on the app tier.
  10. 5940 minLive videoFacing a live stream, leave able to ingest with adaptive bitrate and survive the stampede when the stream starts.
  11. 6035 minNearbyFacing "what is near me," leave able to index points, bound staleness, and avoid leaking a precise location.
  12. 6140 minTicket bookingFacing assigned seats, leave able to hold specific seats with a TTL so you neither oversell nor lock the whole venue.
  13. 6235 minMetrics ingestionFacing a firehose of measurements, leave able to ingest points with a cardinality limit so one tenant cannot blow the store.
  14. 6335 minMock: 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,…
  15. 6440 minMetrics 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.
  16. 6540 minPaymentsFacing money movement, leave able to authorize and capture against an idempotent ledger so a retry cannot move money twice.
  17. 6635 minPayment reconciliationFacing a provider and a ledger that disagree, leave able to find the mismatch and repair it without a silent rewrite of history.
  18. 6740 minCollaborative documentFacing two editors in one document, leave able to persist concurrent edits and presence and say what you do when they diverge.
  19. 6840 minFile syncFacing folders that must match across devices, leave able to sync chunks, resolve conflicts, and survive a client clock that lies.
  20. 6940 minCart and checkoutFacing a purchase, leave able to snapshot price and hold stock so a retry cannot double-charge or double-commit inventory.
  21. 7040 minFlash saleFacing an arrival spike on scarce stock, leave able to queue buyers with a fairness rule instead of letting them pile onto the database.
  22. 7135 minSocial graphFacing follow and block, leave able to store the graph so a privacy check stays correct on the read path.
  23. 7235 minEphemeral 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.
  24. 7340 minWeb crawlerFacing the public web as input, leave able to run a polite frontier with dedupe and freshness so one host is not melted.
  25. 7440 minOrder bookFacing buy and sell orders, leave able to match one instrument on a single sequence and rebuild the book after the matcher crashes.
  26. 7535 minFeature flagsFacing a risky rollout, leave able to serve a flag or kill switch at low latency and bound how stale a client may be.
  27. 7635 minAudit logFacing "who did that," leave able to append a queryable activity log with retention and a tamper claim you can actually keep.
  28. 7735 minMock: 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.

  1. 7835 minSLOs 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.
  2. 7935 minDegradation under partial failureFacing a sick dependency rather than a total outage, leave able to pick a degraded mode and what you refuse to drop.
  3. 8040 minLosing a regionFacing a region that is already dark, leave able to state RPO, RTO, and which side is authoritative for new writes.
  4. 8135 minObservability 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.
  5. 8235 minCost 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.
  6. 8340 minMigration while liveFacing a system that must change shape, leave able to migrate with a dual path and a rollback while writes continue.
  7. 8435 minMock: 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.

  1. 8535 minKit 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.
  2. 8635 minMock: 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…
  3. 8735 minDebrief: 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.
  4. 8835 minMock: 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.
  5. 8935 minDebrief: 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.
  6. 9035 minMock: 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

  1. 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.
  2. How to study1. Set a timer. 2. Attempt the problem. Stop at the attempt line. 3. Then read.
  3. 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

  1. 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…
  2. Article servingClosed-book card for day 86. This file is the interviewer. It is not a worked example.
  3. Delivery dispatchClosed-book card for day 84. This file is the interviewer. It is not a worked example.
  4. Email inboxClosed-book card for day 77. This file is the interviewer. It is not a worked example.
  5. Event intakeClosed-book card for day 88. This file is the interviewer. It is not a worked example.
  6. Image upload and thumbnailsClosed-book card for day 28. This file is the interviewer. It is not a worked example.
  7. Job schedulerClosed-book card for day 63. This file is the interviewer. It is not a worked example.
  8. 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.
  9. PastebinClosed-book card for day 7. This file is the interviewer. It is not a worked example.
  10. Warehouse inventory reservationClosed-book card for day 49. This file is the interviewer. It is not a worked example.

Tools

  1. 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…
  2. Design logThe log is the artifact. There is no certificate.
  3. Design log entryCopy this file into your own notes. Do not fill it in on the template itself.

Appendices

  1. 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.
  2. 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.
  3. Company quirks35 minutes for the whole table, or 10 minutes on the one company you are walking into.
  4. Dynamo (appendix)Leave able to use **consistent hashing**, **sloppy quorum**, **hinted handoff**, and **application-level conflict handling** when the interviewer forbids a…
  5. 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…
  6. 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

  1. System Design: Architecting Scalable LLM Inference for AI AppsTalkSystem Design: Architecting Scalable LLM Inference for AI Apps
  2. 10 million daily users. How many requests per second? | 05 #systemdesignShort10 million daily users. How many requests per second? | 05 #systemdesign
  3. Earliest reset replays attention | 04 #kafka #kafkainternals #courseShortEarliest reset replays attention | 04 #kafka #kafkainternals #course
  4. Memory, disk and network differ by thousands of times | 04 #systemdesignShortMemory, disk and network differ by thousands of times | 04 #systemdesign
  5. A partition is just files on disk | 03 #kafka #internals #courseShortA partition is just files on disk | 03 #kafka #internals #course
  6. Percentiles | 03 #systemdesign #fundamentals #firstprincipleShortPercentiles | 03 #systemdesign #fundamentals #firstprinciple

Lesson source