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
21 pagesThinking in systems
- What a system is made of: clients, servers, databases and the paths between them Beginner 3 pages
- Requirements: functional and non-functional Beginner 3 pages
- Back-of-envelope estimation: QPS, storage, bandwidth Beginner 3 pages
- Latency numbers and powers of two Beginner 3 pages
- Availability, SLAs, SLOs and the nines Beginner 3 pages
- Scalability, reliability and maintainability: what each really means Beginner 3 pages
- Practice: Thinking in systems 3 pages
Chapter 2
30 pagesNetworking
- What happens when you type a URL Beginner 3 pages
- IP addresses, ports and the network layers (just enough) Beginner 3 pages
- How DNS works Beginner 3 pages
- TCP vs UDP Beginner 3 pages
- HTTP/1.1, HTTP/2 and HTTP/3 Intermediate 3 pages
- HTTPS and TLS Beginner 3 pages
- Polling, long polling, SSE and WebSockets Intermediate 3 pages
- Proxies: forward and reverse Beginner 3 pages
- What the network can't promise: latency, loss and partitions Intermediate 3 pages
- Practice: Networking 3 pages
Chapter 3
33 pagesAPIs and communication
- Designing a REST API Beginner 3 pages
- GraphQL Intermediate 3 pages
- gRPC and protocol buffers Intermediate 3 pages
- REST vs GraphQL vs gRPC: how to choose Intermediate 3 pages
- Pagination: offset vs cursor Intermediate 3 pages
- Versioning and backward compatibility Intermediate 3 pages
- Idempotency keys and safe retries Intermediate 3 pages
- Webhooks Intermediate 3 pages
- API gateways Intermediate 3 pages
- Service discovery and service mesh Advanced 3 pages
- Practice: APIs and communication 3 pages
Chapter 4
30 pagesScaling compute
- Vertical vs horizontal scaling Beginner 3 pages
- Load balancers: L4 vs L7 Beginner 3 pages
- Load-balancing algorithms and health checks Intermediate 3 pages
- Stateless services and sessions Beginner 3 pages
- CDNs and edge caching Beginner 3 pages
- Autoscaling Intermediate 3 pages
- Containers and orchestration, in plain words Intermediate 3 pages
- Serverless Intermediate 3 pages
- Monolith vs microservices Intermediate 3 pages
- Practice: Scaling compute 3 pages
Chapter 5
33 pagesDatabases: the foundations
- How a database stores data: pages, rows and logs Intermediate 3 pages
- Relational databases and SQL Beginner 3 pages
- NoSQL types: key-value, document, wide-column, graph Beginner 3 pages
- SQL vs NoSQL: how to choose Beginner 3 pages
- Data modelling from access patterns Intermediate 3 pages
- Normalisation vs denormalisation Intermediate 3 pages
- Indexes: how databases find data Intermediate 3 pages
- B-trees vs LSM trees Advanced 3 pages
- Transactions and ACID Intermediate 3 pages
- Isolation levels and the anomalies they prevent Advanced 3 pages
- Practice: Databases: the foundations 3 pages
Chapter 6
33 pagesDatabases at scale
- Leader-follower replication Intermediate 3 pages
- Multi-leader and leaderless replication Advanced 3 pages
- Quorums: R + W > N Advanced 3 pages
- Replication lag and read-your-writes Intermediate 3 pages
- Sharding strategies: range, hash, directory Intermediate 3 pages
- Consistent hashing Intermediate 3 pages
- Hot partitions and resharding Advanced 3 pages
- Distributed transactions and two-phase commit Advanced 3 pages
- CAP and PACELC Intermediate 3 pages
- Consistency models: linearizable to eventual Advanced 3 pages
- Practice: Databases at scale 3 pages
Chapter 7
21 pagesSpecialised storage
- Object storage and blob stores Beginner 3 pages
- Search engines and inverted indexes Intermediate 3 pages
- Time-series databases Intermediate 3 pages
- Graph databases Intermediate 3 pages
- Data warehouses, data lakes and column stores Intermediate 3 pages
- Change data capture Advanced 3 pages
- Practice: Specialised storage 3 pages
Chapter 8
24 pagesCaching
- Where caches live: from the browser to the database Beginner 3 pages
- Cache-aside, read-through, write-through, write-back Beginner 3 pages
- Eviction: LRU, LFU and TTL Beginner 3 pages
- Cache invalidation Intermediate 3 pages
- Redis and Memcached Intermediate 3 pages
- Distributed caches at scale Advanced 3 pages
- Thundering herd, hot keys, stampedes and cache penetration Advanced 3 pages
- Practice: Caching 3 pages
Chapter 9
36 pagesAsync processing and messaging
- Why async: queues as shock absorbers Beginner 3 pages
- Message queues vs event streams Intermediate 3 pages
- Pub/sub Intermediate 3 pages
- Kafka from the ground up Intermediate 3 pages
- Ordering, partitions and consumer groups Advanced 3 pages
- Delivery guarantees: at-most, at-least, exactly once Advanced 3 pages
- Idempotency and deduplication Intermediate 3 pages
- Retries, dead-letter queues and backpressure Intermediate 3 pages
- The outbox pattern and sagas Advanced 3 pages
- Event sourcing and CQRS Advanced 3 pages
- Batch vs stream processing, and windows Intermediate 3 pages
- Practice: Async processing and messaging 3 pages
Chapter 10
33 pagesDistributed systems
- What goes wrong in distributed systems Intermediate 3 pages
- Clocks and ordering: logical and vector clocks Advanced 3 pages
- Consensus and Raft, explained simply Advanced 3 pages
- Leader election Advanced 3 pages
- Distributed locks and fencing tokens Advanced 3 pages
- Gossip and failure detection Advanced 3 pages
- Conflict resolution: last-write-wins, CRDTs, operational transforms Advanced 3 pages
- Unique ID generation: Snowflake, UUID, ticket servers Intermediate 3 pages
- Bloom filters, HyperLogLog and count-min sketch Intermediate 3 pages
- Geospatial indexing: geohash, quadtrees and S2 Intermediate 3 pages
- Practice: Distributed systems 3 pages
Chapter 11
27 pagesReliability and operations
- Rate limiting algorithms Intermediate 3 pages
- Timeouts, retries, backoff and jitter Intermediate 3 pages
- Circuit breakers, bulkheads and load shedding Intermediate 3 pages
- Redundancy and failover Intermediate 3 pages
- Disaster recovery and multi-region Advanced 3 pages
- Observability: logs, metrics and traces Beginner 3 pages
- Alerting, SLOs and error budgets Intermediate 3 pages
- Deployments: blue-green, canary and feature flags Intermediate 3 pages
- Practice: Reliability and operations 3 pages
Chapter 12
21 pagesSecurity
- Authentication vs authorisation Beginner 3 pages
- Sessions, cookies and JWT Intermediate 3 pages
- OAuth 2.0 and OpenID Connect Intermediate 3 pages
- Encryption in transit and at rest, and storing passwords Intermediate 3 pages
- Secrets and key management Intermediate 3 pages
- Protecting against abuse: DDoS, bots and bad input Intermediate 3 pages
- Practice: Security 3 pages
More to read
Mobile, Frontend, ML and GenAI system design are being written.