Skip to the chapters

Fundamentals

The building blocks every design is made of: caching, databases, queues, consistency, security and more.

102 topics · 12 practice pages · 12 chapters

Start reading

The start of every guide is free, with no sign-up.

Chapter 1

Thinking in systems

21 pages
  1. What a system is made of: clients, servers, databases and the paths between them Beginner 3 pages
  2. Requirements: functional and non-functional Beginner 3 pages
  3. Back-of-envelope estimation: QPS, storage, bandwidth Beginner 3 pages
  4. Latency numbers and powers of two Beginner 3 pages
  5. Availability, SLAs, SLOs and the nines Beginner 3 pages
  6. Scalability, reliability and maintainability: what each really means Beginner 3 pages
  7. Practice: Thinking in systems 3 pages
Chapter 2

Networking

30 pages
  1. What happens when you type a URL Beginner 3 pages
  2. IP addresses, ports and the network layers (just enough) Beginner 3 pages
  3. How DNS works Beginner 3 pages
  4. TCP vs UDP Beginner 3 pages
  5. HTTP/1.1, HTTP/2 and HTTP/3 Intermediate 3 pages
  6. HTTPS and TLS Beginner 3 pages
  7. Polling, long polling, SSE and WebSockets Intermediate 3 pages
  8. Proxies: forward and reverse Beginner 3 pages
  9. What the network can't promise: latency, loss and partitions Intermediate 3 pages
  10. Practice: Networking 3 pages
Chapter 3

APIs and communication

33 pages
  1. Designing a REST API Beginner 3 pages
  2. GraphQL Intermediate 3 pages
  3. gRPC and protocol buffers Intermediate 3 pages
  4. REST vs GraphQL vs gRPC: how to choose Intermediate 3 pages
  5. Pagination: offset vs cursor Intermediate 3 pages
  6. Versioning and backward compatibility Intermediate 3 pages
  7. Idempotency keys and safe retries Intermediate 3 pages
  8. Webhooks Intermediate 3 pages
  9. API gateways Intermediate 3 pages
  10. Service discovery and service mesh Advanced 3 pages
  11. Practice: APIs and communication 3 pages
Chapter 4

Scaling compute

30 pages
  1. Vertical vs horizontal scaling Beginner 3 pages
  2. Load balancers: L4 vs L7 Beginner 3 pages
  3. Load-balancing algorithms and health checks Intermediate 3 pages
  4. Stateless services and sessions Beginner 3 pages
  5. CDNs and edge caching Beginner 3 pages
  6. Autoscaling Intermediate 3 pages
  7. Containers and orchestration, in plain words Intermediate 3 pages
  8. Serverless Intermediate 3 pages
  9. Monolith vs microservices Intermediate 3 pages
  10. Practice: Scaling compute 3 pages
Chapter 5

Databases: the foundations

33 pages
  1. How a database stores data: pages, rows and logs Intermediate 3 pages
  2. Relational databases and SQL Beginner 3 pages
  3. NoSQL types: key-value, document, wide-column, graph Beginner 3 pages
  4. SQL vs NoSQL: how to choose Beginner 3 pages
  5. Data modelling from access patterns Intermediate 3 pages
  6. Normalisation vs denormalisation Intermediate 3 pages
  7. Indexes: how databases find data Intermediate 3 pages
  8. B-trees vs LSM trees Advanced 3 pages
  9. Transactions and ACID Intermediate 3 pages
  10. Isolation levels and the anomalies they prevent Advanced 3 pages
  11. Practice: Databases: the foundations 3 pages
Chapter 6

Databases at scale

33 pages
  1. Leader-follower replication Intermediate 3 pages
  2. Multi-leader and leaderless replication Advanced 3 pages
  3. Quorums: R + W > N Advanced 3 pages
  4. Replication lag and read-your-writes Intermediate 3 pages
  5. Sharding strategies: range, hash, directory Intermediate 3 pages
  6. Consistent hashing Intermediate 3 pages
  7. Hot partitions and resharding Advanced 3 pages
  8. Distributed transactions and two-phase commit Advanced 3 pages
  9. CAP and PACELC Intermediate 3 pages
  10. Consistency models: linearizable to eventual Advanced 3 pages
  11. Practice: Databases at scale 3 pages
Chapter 7

Specialised storage

21 pages
  1. Object storage and blob stores Beginner 3 pages
  2. Search engines and inverted indexes Intermediate 3 pages
  3. Time-series databases Intermediate 3 pages
  4. Graph databases Intermediate 3 pages
  5. Data warehouses, data lakes and column stores Intermediate 3 pages
  6. Change data capture Advanced 3 pages
  7. Practice: Specialised storage 3 pages
Chapter 8

Caching

24 pages
  1. Where caches live: from the browser to the database Beginner 3 pages
  2. Cache-aside, read-through, write-through, write-back Beginner 3 pages
  3. Eviction: LRU, LFU and TTL Beginner 3 pages
  4. Cache invalidation Intermediate 3 pages
  5. Redis and Memcached Intermediate 3 pages
  6. Distributed caches at scale Advanced 3 pages
  7. Thundering herd, hot keys, stampedes and cache penetration Advanced 3 pages
  8. Practice: Caching 3 pages
Chapter 9

Async processing and messaging

36 pages
  1. Why async: queues as shock absorbers Beginner 3 pages
  2. Message queues vs event streams Intermediate 3 pages
  3. Pub/sub Intermediate 3 pages
  4. Kafka from the ground up Intermediate 3 pages
  5. Ordering, partitions and consumer groups Advanced 3 pages
  6. Delivery guarantees: at-most, at-least, exactly once Advanced 3 pages
  7. Idempotency and deduplication Intermediate 3 pages
  8. Retries, dead-letter queues and backpressure Intermediate 3 pages
  9. The outbox pattern and sagas Advanced 3 pages
  10. Event sourcing and CQRS Advanced 3 pages
  11. Batch vs stream processing, and windows Intermediate 3 pages
  12. Practice: Async processing and messaging 3 pages
Chapter 10

Distributed systems

33 pages
  1. What goes wrong in distributed systems Intermediate 3 pages
  2. Clocks and ordering: logical and vector clocks Advanced 3 pages
  3. Consensus and Raft, explained simply Advanced 3 pages
  4. Leader election Advanced 3 pages
  5. Distributed locks and fencing tokens Advanced 3 pages
  6. Gossip and failure detection Advanced 3 pages
  7. Conflict resolution: last-write-wins, CRDTs, operational transforms Advanced 3 pages
  8. Unique ID generation: Snowflake, UUID, ticket servers Intermediate 3 pages
  9. Bloom filters, HyperLogLog and count-min sketch Intermediate 3 pages
  10. Geospatial indexing: geohash, quadtrees and S2 Intermediate 3 pages
  11. Practice: Distributed systems 3 pages
Chapter 11

Reliability and operations

27 pages
  1. Rate limiting algorithms Intermediate 3 pages
  2. Timeouts, retries, backoff and jitter Intermediate 3 pages
  3. Circuit breakers, bulkheads and load shedding Intermediate 3 pages
  4. Redundancy and failover Intermediate 3 pages
  5. Disaster recovery and multi-region Advanced 3 pages
  6. Observability: logs, metrics and traces Beginner 3 pages
  7. Alerting, SLOs and error budgets Intermediate 3 pages
  8. Deployments: blue-green, canary and feature flags Intermediate 3 pages
  9. Practice: Reliability and operations 3 pages
Chapter 12

Security

21 pages
  1. Authentication vs authorisation Beginner 3 pages
  2. Sessions, cookies and JWT Intermediate 3 pages
  3. OAuth 2.0 and OpenID Connect Intermediate 3 pages
  4. Encryption in transit and at rest, and storing passwords Intermediate 3 pages
  5. Secrets and key management Intermediate 3 pages
  6. Protecting against abuse: DDoS, bots and bad input Intermediate 3 pages
  7. Practice: Security 3 pages

More to read

Mobile, Frontend, ML and GenAI system design are being written.