Building Projects
Reading about system design is not the same as building. These chapters take a product from requirements to a working design, with the decisions and failure modes made explicit.
Most build guides stop at the architecture diagram. That is the easy part. The work that decides whether a project survives contact with users is everything after the diagram: what happens when the same request arrives twice, what the system does when a dependency is slow, who cleans up after a failed job, which invariant the code is allowed to violate under load, and how an operator knows what to do at 3 a.m.
Each build therefore covers:
- Scope — what is in and out for v1.
- Actors and journeys — who uses it and what they are trying to finish.
- Invariants — what must never be true, even during a partial failure.
- Estimates — load, storage, bandwidth, and the number that will break first.
- End-to-end flows — the happy path plus the branches that matter.
- Data model and state — keys, indexes, transitions, and retention.
- Edge cases — the awkward inputs and races that produce support tickets.
- Failure and recovery — what degrades, what fails closed, and how to get back.
- Operations — deploy, migration, backfill, monitoring, and incident process.
- Testing — what to test deliberately instead of hoping production finds it.
- Milestones — what to build in which order, with acceptance criteria.
- Review checklist — the questions a senior reviewer would ask.
The builds
| Build | Core challenge | What makes it hard |
|---|---|---|
| URL Shortener | ID generation, redirect latency, abuse | A read-heavy path that must stay correct when caches and databases disagree |
| Chat System | ordering, delivery, presence, fan-out | Per-conversation order and offline sync across unreliable connections |
| News Feed | fan-out on write vs read, ranking | Keeping a derived feed consistent enough while celebrities and deletes break the assumptions |
| Video Streaming | ingestion, transcoding, CDN economics | Long-running jobs, large objects, and a cost curve that punishes every shortcut |
| Todo CLI | small scope done rigorously | Every production habit in a program with no server to hide behind |
| Web Server from Scratch | protocol parsing, concurrency, limits | One parser bug becomes a security incident or a hung process |
How to read a build
Do not read these as designs to copy. Read them as a sequence of decisions:
- Write the user journey and the invariants before choosing components.
- Estimate the load and identify the first bottleneck.
- Draw the happy path, then draw the failure branches.
- For every queue, cache, and external call, decide what happens when it is slow, down, or returns a duplicate.
- Define the recovery procedure before you need it.
- Build the smallest vertical slice and add the failure handling you would actually page on.
A build is not finished until…
- The critical path is implemented end to end (not just diagrammed).
- The data model has keys and indexes matching the queries.
- Every write is idempotent, or the system has a documented way to reconcile duplicates.
- Every external call has a timeout, and retries are bounded.
- There is a load test at the target scale, or a documented reason it is infeasible.
- Failures are simulated: dependency down, slow, duplicate delivery, restart, partial write.
- Inputs are validated; outputs and queues are bounded.
- Logs, metrics, and traces answer "what happened to request X?".
- A runbook exists for the top three failure modes.
- Deletes, expiry, and retention have an owner and a test.
- The README explains how to run it and what was intentionally left out.
How to use these chapters
Use each chapter as a checklist, not a template:
- Write your own requirements and estimates.
- Sketch the data model and API before the architecture.
- Build the smallest vertical slice.
- Add the failure handling you would page on.
- Compare your decisions with the chapter and note the differences.
- Run the review questions with someone who did not build it.
The best sign that a build guide worked is not that you copied it. It is that you can explain why your design differs.