System Design Fundamentals
A guided path from foundations to complete designs.
Need the basics? System Design foundations.
Course modules
Frame a design4 lessons
Choose an entry point and understand the requirements → components → designs progression
Follow a request6 lessons
Annotate where name lookup, connection setup and response work occur
Store and find data8 lessons
Select keys and records from actual reads, writes and invariants
- 11Start a data design with access patterns
- 12Choose relational, document and key-value models
- 13Make queries fast and account for write costs
- 14Replicate data and observe lag
- 15Partition data without hiding hot keys
- 16Compose a distributed key-value store
- 17Store large objects separately from metadata
- 18Find eligible results through an index
Move work through time6 lessons
Separate interactive acceptance from background completion; derive backlog growth
Preserve correctness7 lessons
Distinguish unavailable, delayed, failed and unknown outcomes under a declared failure model
Operate the system9 lessons
Choose placement, expiry, invalidation and stampede handling
- 32Cache data while preserving a freshness contract
- 33Limit request rates under a declared policy
- 34Bound overload, retries and waiting
- 35Observe user outcomes and internal behavior
- 36Enforce identity and tenant boundaries
- 37Change a running system safely
- 38Recover across regions and restore data
- 39Aggregate counts without one hot writer
- 40Checkpoint: review a production-ready design
Compose complete systems20 lessons
A baseline short-link design with collision and redirect requirements
- 41Short links: identifiers, redirects and data placement
- 42Short links under skew, abuse and failure
- 43Chat: durable messages and live delivery
- 44Chat after disconnection
- 45Feeds: choose fan-out and stable pagination
- 46Feeds under skew and changing eligibility
- 47Payments: record an approved money movement
- 48Payments with uncertain external outcomes
- 49Media: upload, process and publish
- 50Media under burst traffic and failed processing
- 51Search and suggestions: build the read model
- 52Search when evidence or eligibility changes
- 53Dispatch: fresh locations and exclusive assignments
- 54Dispatch under stale data and contention
- 55Collaborative editing: represent concurrent work
- 56Collaborative editing after offline divergence
- 57A crawler: frontier, fetching and deduplication
- 58A crawler under hostile and changing inputs
- 59A job-execution platform: submit, isolate and observe
- 60A job-execution platform under worker loss
Optional study
Optional AI architectures6 lessons
A serving design with workload, batching, admission and memory assumptions
Optional interview practice3 lessons
A concise discussion of scope, estimates, alternatives and failure behavior
After the core
Continue into optional AI architecture or practise explaining an unfamiliar design. Design communication and independent design practice remain available when you need them.
Reference material
Explore both System Design courses
Workload and constraints
- Estimating Northwind’s Launch-Day Traffic Before It Arrives
- From Browser to Server: Networking, Load Balancers, and Latency Budgets
Module checkpoint
Hypothetical scenario. A catalogue receives 200 requests/s and a chosen mean service time of 0.1s under stable flow. A request makes three independent remote reads after an initial lookup. Explain what changes when retention doubles and the remote reads are made concurrent.
Write your decision and assumptions before opening the explanation.
Compare your reasoning
Mean in-flight work is 200 × 0.1 = 20 requests under the stated stable accounting. Doubling retention doubles retained payload only if ingestion, record size and deletion policy stay fixed; it does not itself double request rate. Concurrent independent reads replace their serial sum with a critical-path maximum, plus actual coordination costs. They can reduce latency while retaining the same remote work and increasing instantaneous concurrency. Establish deadlines and dependency limits before accepting more work.
Revisit: Estimating Northwind’s Launch-Day Traffic Before It Arrives · From Browser to Server: Networking, Load Balancers, and Latency Budgets
Data and asynchronous work
- Choosing a Data Model: Postgres, Key-Value, and Document Stores
- Indexes: Why Queries Are Fast and What Writes Pay for It
- Caching with Redis: Why the Price Page Stampeded, and How to Stop It
- Queues and Streams: Smoothing Spikes with Kafka, SQS, and RabbitMQ
Module checkpoint
Hypothetical scenario. A seller withdraws an item. The authoritative transaction commits, but the event publisher crashes before updating the cache and search view. A retried consumer later receives the same update twice. Trace what may remain stale and which boundary prevents duplicate effects.
Write your decision and assumptions before opening the explanation.
Compare your reasoning
Persist publication intent with the authoritative transaction, then retry delivery. Derived views can remain stale until processing succeeds; a cache TTL alone does not establish immediate withdrawal visibility. Use identity and version checks at the derived effect boundary so an older event cannot undo a newer state. Consumer acknowledgement after the effect still leaves an uncertain interval, so record deduplication together with the effect where the selected store permits it. A source of truth, an index, a cache and a queue have distinct contracts.
Revisit: Choosing a Data Model: Postgres, Key-Value, and Document Stores · Indexes: Why Queries Are Fast and What Writes Pay for It · Caching with Redis: Why the Price Page Stampeded, and How to Stop It · Queues and Streams: Smoothing Spikes with Kafka, SQS, and RabbitMQ
Distribute the data
- Consistency: What Replicas Promise and the CAP/PACELC Trade-offs
- Partitioning: Consistent Hashing and Hot Shards
- Replication and Failover: What Gets Lost When the Primary Dies
Module checkpoint
Hypothetical scenario. One tenant produces 400 requests/s and cannot be split by the current tenant key. A region becomes isolated immediately after a withdrawal is acknowledged. Explain whether adding shards and promoting a reachable replica establishes safe, current reads.
Write your decision and assumptions before opening the explanation.
Compare your reasoning
More tenant-keyed shards cannot split that tenant’s indivisible demand. The system must also identify which acknowledgement boundary covered the withdrawal, whether the candidate holds and can expose that state, and how obsolete writers are excluded. Reachability establishes none of those facts. For an operation promising a current authoritative status, return a permitted unavailable outcome rather than silently serving stale state. A description view can have a separately declared weaker contract.
Revisit: Consistency: What Replicas Promise and the CAP/PACELC Trade-offs · Partitioning: Consistent Hashing and Hot Shards · Replication and Failover: What Gets Lost When the Primary Dies
Design for failure
- Idempotency Keys: How Northwind Stopped Double-Charging Customers
- Observability: Metrics, Logs, Traces, and SLOs with OpenTelemetry
- Overload: Timeouts, Backpressure, Load Shedding, and Rate Limiting
Module checkpoint
Hypothetical scenario. A reservation times out after committing, the caller retries, and every service layer also retries. Traces cover only a sample. Define a safe response and explain what the evidence can establish.
Write your decision and assumptions before opening the explanation.
Compare your reasoning
Keep one logical operation identity and reconcile its authoritative effect. A timeout or absent sampled trace does not prove failure. Bound attempts across layers under the remaining task deadline, protect dependency concurrency and reject expired work. Measure attempts separately from logical outcomes, and inspect telemetry loss before treating the trace store as complete. A breaker protects resources while open; it does not reverse a completed reservation.
Revisit: Idempotency Keys: How Northwind Stopped Double-Charging Customers · Observability: Metrics, Logs, Traces, and SLOs with OpenTelemetry · Overload: Timeouts, Backpressure, Load Shedding, and Rate Limiting
Coordinate changes
- Raft in Practice: How a Cluster Agrees on Who Is in Charge
- Distributed Transactions: Two-Phase Commit vs Sagas
Module checkpoint
Hypothetical scenario. A correctly elected replacement worker submits a refund while the previous worker resumes. The provider does not inspect authority generations, and one response is lost. Has consensus completed the workflow design?
Write your decision and assumptions before opening the explanation.
Compare your reasoning
No. Agreement protects the coordinator’s decision within its scope. The external effect needs enforceable authority or supported operation identity and reconciliation. Record requested, confirmed and unresolved refund states. If the workflow permits compensation, specify its intermediate states and late-result policy; compensation itself can fail. An atomic commit mechanism only covers participants that support its actual protocol.
Revisit: Raft in Practice: How a Cluster Agrees on Who Is in Charge · Distributed Transactions: Two-Phase Commit vs Sagas
Work through a complete architecture
- Case: Designing a Short-Link Service
- Case: A Permission-Aware Document Assistant (RAG at Scale)
- Case: Real-Time Chat and Offline Sync
- Case: Payments and a Balanced Ledger
- Safe Change: Deployments, Canaries, Rollbacks, and Regions
- Northwind End-to-End Design Review: Contracts, Authority, Evidence, and Recovery
Module checkpoint
Hypothetical scenario. Review both final architectures after a cache restart and a permission or withdrawal change. Produce a workload estimate, name the authoritative state, choose unavailable behavior and explain what evidence would block release.
Write your decision and assumptions before opening the explanation.
Compare your reasoning
For the URL case, preserve token identity and future-request withdrawal semantics while bounding refill work; analytics remain a separately declared derived path. For the assistant, eligible source versions and permissions must survive cache and index routing; fluent answers cannot override missing authority or support. In both cases, use explicit cold-path demand, safe retry identity, bounded recovery and outcome-specific indicators. A permission leak, conflicting token assignment or unsupported withdrawal promise blocks release under the stated contracts even if mean latency improves. Explain one rejected alternative and a measurable condition that would change that decision.
Revisit: Case: Designing a Short-Link Service · Case: A Permission-Aware Document Assistant (RAG at Scale)
Optional architecture cases
- Architecture case: feeds, fan-out, and stable pagination
- Architecture case: media processing and versioned playback
- Architecture case: search, suggestions, and eligible results
- Architecture case: location freshness and exclusive dispatch
- Architecture case: concurrent editing and recoverable history
Module checkpoint
Hypothetical scenario. A withdrawn supplier post returns during feed replay, an old media job finishes after a correction, a suggestion exposes a restricted title, two orders select one driver, and an offline editor returns after access revocation. Name the authority and version check each path needs before accepting another visible effect.
Write your decision and assumptions before opening the explanation.
Compare your reasoning
Feed reconstruction preserves withdrawal and source-version evidence. Media publication conditionally selects the currently authorized complete presentation. Suggestions check eligibility before disclosure and scope their caches accordingly. Dispatch accepts one assignment through an authoritative conditional transition, then validates offer generation and expiry on late responses. Collaborative synchronization applies the current accepted-operation and permission policy; convergence does not grant editing or approval authority. For one case, derive the workload from the stated inputs and explain which cost remains outside that calculation. A successful candidate lookup or completed worker does not settle the authoritative transition.
Revisit: Architecture case: feeds, fan-out, and stable pagination · Architecture case: media processing and versioned playback · Architecture case: search, suggestions, and eligible results · Architecture case: location freshness and exclusive dispatch · Architecture case: concurrent editing and recoverable history