System Design Bible

Illustrated chapters

Every chapter below is the complete markdown source, rendered for reading: nothing summarised, nothing cut. Animated SVG figures, comparison tables and ASCII board dumps are additions on top of the text. Use the sidebar inside each chapter to jump between sections; the theme and animation controls persist.

File 01 · ★☆☆☆☆

Load Balancing

One front door for a hundred servers: forwarding modes, routing algorithms, L4 vs L7, health checks and draining.

8 animationsRound robin → P2CProxy · NAT · DSR · TUN
File 02 · ★★☆☆☆

Caching Strategies

The latency pyramid, the five read/write patterns, eviction policies, and the three cache killers that take databases down.

7 animationsCache-aside → write-backLRU · LFU · TinyLFU
File 03 · ★★☆☆☆

Rate Limiting

Five algorithms with their exact trade-offs, distributed counting in Redis, and how to say “no” in a way clients can act on.

8 animationsToken · leaky bucketSliding window
File 04 · ★★★★☆

Sharding & Partitioning

The only way to scale writes: partitioning strategies, shard-key choice, rebalancing, hot spots and cross-shard pain.

9 animationsRange · hash · directoryFixed partitions
File 05 · ★★☆☆☆

Content Delivery Networks

Beating the speed of light with edges: push vs pull, anycast and GeoDNS routing, TTLs, purging and origin shield.

6 animationsAnycast vs DNSOrigin shield
File 06 · ★★★☆☆

Consistent Hashing

Why hash % N is a catastrophe, how the ring fixes it, virtual nodes for skew, plus rendezvous and jump hash.

5 animationsThe ringVirtual nodes
File 07 · ★★★☆☆

Message Queues & Streaming

Breaking synchronous coupling: queue vs log, Kafka partitions and consumer groups, delivery semantics, DLQs and lag.

5 animationsQueue vs logAt-least-once
File 08 · ★★★★★

Consensus & Replication

Quorums, CAP and PACELC, the three replication models, N/W/R tuning, Raft and the full consistency spectrum.

6 animationsMajority overlapRaft