Skip to content

Roadmap

64 topics in 10 tracks, then 19 case studies. Read the stages in order. Inside a stage, read the core topics first.

How to use this roadmap

  1. Read one topic at a time. Do each walkthrough and each estimate yourself before you read the answer.
  2. Do the quiz at the end. Your score sets the date of your next revision. The site saves it in this browser.
  3. Revise when a topic is due. Due topics show a mark below. A short revision now saves a long one later.
  4. After each stage, do its case studies. A case study uses the topics of the stage in one complete design.

0 of 64 started

6 topics are ready to read. Nothing is due for revision.

Show

  • Ready
  • Done
  • Due
  • Planned
  1. 1

    Foundations

    Start here

    How to approach a design, the numbers that decide it, and what "scalable" and "available" mean in numbers.

    1. 1.How to approach a system design problemCore20 minReady to read
    2. 2.Numbers every engineer should knowCoreGo build25 minReady to read
    3. 3.Back-of-envelope estimationCore30 minReady to read
    4. 4.Performance vs scalability, scaling up vs scaling outCore25 minReady to read
    5. 5.Availability in numbers: nines, SLOs, error budgetsCore30 minReady to read

    Networking and communication

    How a request travels, how services talk to each other, and how traffic is spread over servers.

    1. 6.How a request travels: DNS, TCP, TLS, HTTPCorePlanned
    2. 7.TCP vs UDP, and HTTP/1.1 vs HTTP/2 vs HTTP/3IntermediatePlanned
    3. 8.API styles: REST, gRPC, GraphQLCorePlanned
    4. 9.Load balancing: L4 vs L7, algorithms, health checksCoreGo buildPlanned
    5. 10.CDNs: push vs pull, edge cachingCorePlanned
    6. 11.API gateways, backends-for-frontends, service discoveryIntermediatePlanned
    7. 12.Real-time delivery: polling, WebSockets, server-sent eventsIntermediatePlanned

    Then design

    • URL shortener
  2. 2

    Data

    Storage and databases

    Data models, how storage engines work inside, transactions, and the special stores for blobs, search and time series.

    1. 13.Choosing a data model: relational, key-value, document, wide-column, graphCorePlanned
    2. 14.How indexes work: B-treesIntermediateGo buildPlanned
    3. 15.LSM-trees, SSTables and compactionIntermediateGo buildPlanned
    4. 16.Write-ahead logs, fsync and crash recoveryIntermediateGo buildPlanned
    5. 17.Transactions and isolation levelsIntermediatePlanned
    6. 18.Query performance: tuning, denormalization, materialized viewsIntermediatePlanned
    7. 19.Object storage: blobs, metadata, erasure codingIntermediatePlanned
    8. 20.Search: inverted indexesIntermediatePlanned
    9. 21.Time-series dataAdvancedPlanned
    10. 22.Probabilistic data structures: Bloom filters, HyperLogLog, count-min sketchIntermediateGo buildPlanned
    11. 23.Geospatial indexing: geohash, quadtrees, S2IntermediatePlanned

    Caching

    Where to put a cache, how to keep it correct, and what happens when one key gets all the traffic.

    1. 38.Cache strategies: cache-aside, read-through, write-through, write-behind, refresh-aheadCorePlanned
    2. 39.Where to cache: client, CDN, web server, application, databaseCorePlanned
    3. 40.Eviction and invalidation: LRU, LFU, TTLCoreGo buildPlanned
    4. 41.Hot keys, stampedes and request coalescingIntermediatePlanned

    Then design

    • Rate limiter
    • Unique ID generator
    • Distributed cache
    • Search autocomplete
  3. 3

    Distribution

    Replication and partitioning

    Copies of data for safety and speed, and splitting data so that it fits on many machines.

    1. 24.Leader–follower replication: lag, failoverCorePlanned
    2. 25.Multi-leader and leaderless replication: quorums, read repair, hinted handoffIntermediatePlanned
    3. 26.Partitioning: by range vs by hash, hot spots, rebalancingCorePlanned
    4. 27.Consistent hashingCoreGo buildLive demo25 minReady to read
    5. 28.Rendezvous hashing, Jump hash and MaglevAdvancedPlanned
    6. 29.Request routing and secondary indexes across partitionsIntermediatePlanned

    Then design

    • Key-value store (Dynamo-style)
  4. 4

    Agreement

    Consistency and consensus

    What "consistent" means, how machines agree on order and on a leader, and how transactions span services.

    1. 30.CAP and PACELCCorePlanned
    2. 31.Consistency models: linearizable, causal, eventual, read-your-writesIntermediatePlanned
    3. 32.Time and order: clock drift, Lamport clocks, vector clocks, HLCIntermediateLive demoPlanned
    4. 33.Resolving conflicts: last-write-wins, version vectors, CRDTsAdvancedGo buildPlanned
    5. 34.Consensus with RaftAdvancedGo buildLive demoPlanned
    6. 35.Leader election, leases and fencing tokensIntermediatePlanned
    7. 36.Distributed transactions: two-phase commit, sagas, compensationIntermediatePlanned
    8. 37.Coordination services: etcd and ZooKeeperIntermediatePlanned

    Then design

    • Distributed job scheduler
  5. 5

    Async and failure

    Messaging, streams and batch

    Doing work later and elsewhere, delivery guarantees, logs, and processing data in large batches or as events arrive.

    1. 42.Why asynchronous: queues, task queues, background jobsCorePlanned
    2. 43.Delivery guarantees: at-most-once, at-least-once, exactly-once, and idempotencyCorePlanned
    3. 44.Logs vs queues: how Kafka worksIntermediateGo buildPlanned
    4. 45.Messaging patterns: pub/sub, competing consumers, priority queues, claim checkIntermediatePlanned
    5. 46.Batch processing: MapReduce and dataflowIntermediatePlanned
    6. 47.Stream processing: windows, watermarks, stateAdvancedPlanned
    7. 48.Change data capture and the outbox patternIntermediatePlanned

    Reliability and operations

    Failing well, protecting a service from overload, finding failures, and recovering from disasters.

    1. 49.Timeouts, retries, backoff with jitter, retry stormsCorePlanned
    2. 50.Circuit breakers and bulkheadsIntermediateGo buildPlanned
    3. 51.Rate limiting: token bucket, leaky bucket, sliding windowCoreGo buildLive demoPlanned
    4. 52.Back pressure and load sheddingIntermediatePlanned
    5. 53.Failure detection: heartbeats, phi accrual, gossip (SWIM)AdvancedGo buildPlanned
    6. 54.Observability: metrics, logs, traces, alertsCorePlanned
    7. 55.Performance antipatterns: chatty I/O, busy database, noisy neighbourIntermediatePlanned
    8. 56.Multi-region and disaster recovery: RPO, RTO, backups, active-activeIntermediatePlanned

    Then design

    • Notification system
    • Web crawler
    • Message queue (Kafka)
    • Metrics and monitoring system
  6. 6

    Architecture

    Architecture patterns

    How to divide a system into services, and the patterns that connect them.

    1. 57.Monolith vs microservices, and service boundariesCorePlanned
    2. 58.Event-driven architecture: choreography vs orchestrationIntermediatePlanned
    3. 59.CQRS and event sourcingIntermediatePlanned
    4. 60.Sidecar, ambassador and service meshIntermediatePlanned
    5. 61.Migrating safely: strangler fig, anti-corruption layerIntermediatePlanned
    6. 62.Async request–reply, pipes and filters, scheduler–agent–supervisorAdvancedPlanned

    Security

    Who the caller is, what they can do, and how services trust each other.

    1. 63.Authentication and authorization: sessions, tokens, OAuth2 and OIDCCorePlanned
    2. 64.Securing services: TLS and mTLS, signed URLs, gatekeeper, secretsIntermediatePlanned

    Then design

    • News feed
    • Chat system
    • Video streaming
    • Ride sharing and nearby places
    • Payment system
  7. 7

    Capstones

    Then design

    • Object storage (S3)
    • File sync (Dropbox)
    • Capstone: backup and restore for Kubernetes

Interview fast track

If you have little time before an interview, read these 27 topics in this order. Then do the URL shortener, rate limiter, key-value store and news feed case studies.

  1. 1How to approach a system design problem
  2. 2Numbers every engineer should know
  3. 3Back-of-envelope estimation
  4. 4Performance vs scalability, scaling up vs scaling out
  5. 5Availability in numbers: nines, SLOs, error budgets
  6. 6How a request travels: DNS, TCP, TLS, HTTP
  7. 7API styles: REST, gRPC, GraphQL
  8. 8Load balancing: L4 vs L7, algorithms, health checks
  9. 9CDNs: push vs pull, edge caching
  10. 10Choosing a data model: relational, key-value, document, wide-column, graph
  11. 11Transactions and isolation levels
  12. 12Probabilistic data structures: Bloom filters, HyperLogLog, count-min sketch
  13. 13Geospatial indexing: geohash, quadtrees, S2
  14. 14Leader–follower replication: lag, failover
  15. 15Partitioning: by range vs by hash, hot spots, rebalancing
  16. 16Consistent hashing
  17. 17CAP and PACELC
  18. 18Distributed transactions: two-phase commit, sagas, compensation
  19. 19Cache strategies: cache-aside, read-through, write-through, write-behind, refresh-ahead
  20. 20Eviction and invalidation: LRU, LFU, TTL
  21. 21Why asynchronous: queues, task queues, background jobs
  22. 22Delivery guarantees: at-most-once, at-least-once, exactly-once, and idempotency
  23. 23Timeouts, retries, backoff with jitter, retry storms
  24. 24Rate limiting: token bucket, leaky bucket, sliding window
  25. 25Observability: metrics, logs, traces, alerts
  26. 26Monolith vs microservices, and service boundaries
  27. 27Authentication and authorization: sessions, tokens, OAuth2 and OIDC