Skip to main content
Free courses · 11 lessons

System Design Step by Step: A Free Course in 7 Modules

A free system design course in seven modules: scaling, caching, databases, consistency, reliability and case studies, with step-through animated diagrams.

By Matthews WongReviewed on

Key takeaway

System design is the practice of turning requirements into an architecture that holds up under load and failure. This free course teaches it in seven core lessons, one per module, from capacity estimation and caching to replication, consistency, reliability patterns and a full case study, then four deep dives on API design, real-time delivery, idempotency and event-driven systems. Each lesson has a diagram you step through and a short quiz, then 51 posts to go further.

Free, no sign-up, no certificate. Built from the setup that runs this website.

Start the course

What you will be able to do

  • Estimate load and storage from a requirement, and size a design to it.
  • Choose between caching, replication, partitioning and sharding for a real bottleneck.
  • Explain consistency, consensus and reliability trade-offs in plain words.
  • Work through a system design interview with one repeatable framework.

Who it is for

Developers preparing for system design interviews, and engineers who want the reasoning behind the architectures they already run.

Before you start

  • You have built a web app with a database.
  • Read the modules in order the first time; jump around afterwards.
Where should I start?

Five questions to find your starting lesson

Already know some of this? Answer five questions from across the course and get a lesson to start at. It is only a suggestion: every lesson stays open.

  1. 1.Your app expects 2,000,000 daily users making 10 requests each, with a peak 3 times the average. Roughly what rate do you size for?
  2. 2.A tenant's order list got slow at 2 million rows. CPU is fine and one query dominates. What do you try first?
  3. 3.A thousand clients fail at the same moment and all retry after exactly 200, 400 and 800 ms. What does the recovering provider see?
  4. 4.Asked to design this website in an interview, you open by choosing Postgres and Redis. Which step did you skip?
  5. 5.A dashboard shows live order counts. The server pushes updates; the browser sends nothing back except page loads. Which fits with the fewest moving parts?
Lessons

System design, step by step

  1. System Design Estimation for Beginners: Users to ServersSystem design estimation step by step: turn daily users into peak requests per second, storage and servers, then link latency to load with Little's law.12 min · 3 posts to go deeper
  2. How to Scale a Web Application: Stateless Servers to CDNHow to scale a web application step by step: stateless copies behind a load balancer, sessions in a shared store, then a CDN and a cache to absorb reads.13 min · 6 posts to go deeper
  3. How to Scale a Database: Indexes, Replicas and ShardingHow to scale a database step by step: model data around queries, add the right index, use read replicas despite lag, then shard by key with IDs that scale.14 min · 7 posts to go deeper
  4. Consistency in Distributed Systems Explained: ACID, CAP, SagasConsistency in distributed systems, step by step: ACID and isolation on one node, CAP and PACELC, two-phase commit versus sagas, and leases with fencing.14 min · 7 posts to go deeper
  5. Reliability Patterns Explained: Retries to Circuit BreakersReliability patterns explained: SLOs, error budgets, redundancy, failover, retries with backoff and jitter, bulkheads, backpressure, circuit breakers.14 min · 6 posts to go deeper
  6. Microservices for Beginners: Boundaries, Sync vs Async, QueuesLearn microservices from the ground up: when a modular monolith is enough, how to draw service boundaries, and when a call should be sync, async or queued.13 min · 8 posts to go deeper
  7. System Design Case Study Example: Designing This WebsiteA worked system design case study: the seven-step framework applied to this website, from requirements and numbers to the request path and its weak spots.14 min · 14 posts to go deeper
  8. API Design for Beginners: Resources, Errors and VersioningAPI design for beginners: resources and methods, honest status codes, one error shape, versioning and deprecation, rate limits, pagination and OpenAPI.15 min
  9. WebSocket vs SSE vs Long Polling: Real-Time Updates ExplainedWebSocket vs SSE vs long polling: how each one delivers server updates, what it keeps open, Last-Event-ID reconnects, proxy buffering and idle timeouts.15 min
  10. Idempotency Explained: Safe Retries and Idempotency KeysIdempotency explained: safe vs idempotent HTTP methods, why retries need it, how idempotency keys work, idempotent consumers, upserts and re-runnable jobs.14 min
  11. Event-Driven Architecture Explained: Queues, Logs and OutboxEvent-driven architecture explained: events vs commands, queues vs logs, at-least-once delivery, idempotent consumers, ordering, backlog and the outbox.15 min
Course check

10 questions from across the course

One question from each part of the course, in order. Get 8 of 10 right and you have its core. Every answer links to the lesson that teaches it, and nothing is locked either way.

  1. 1.Your app expects 2,000,000 daily users making 10 requests each, with a peak 3 times the average. Roughly what rate do you size for?
  2. 2.Which response is safe to keep at a shared CDN edge for a long time?
  3. 3.Your multi-tenant app shards by tenant_id. One tenant now has ten times the orders of any other. What happens?
  4. 4.Two cashiers sell from the same balance at the same second. Your code runs SELECT balance, subtracts in TypeScript, then UPDATEs with the result, at PostgreSQL's default isolation level. What happens?
  5. 5.After a deploy, the container's health check fails three times in a row. The service has restart: unless-stopped. What does Docker do?
  6. 6.Three services must each react when an order is paid, and none may miss an event while it restarts. Which fits?
  7. 7.Asked to design this website in an interview, you open by choosing Postgres and Redis. Which step did you skip?
  8. 8.Your API answers a missing order with status 200 and an error message in the body. What goes wrong?
  9. 9.An EventSource reconnects after its connection dropped. How does the server know where to resume?
  10. 10.Which HTTP method is idempotent but not safe?