Practical, battle-tested system design patterns with real-world references, code examples, and architectural diagrams.
| Pattern | Description | Real-World References |
|---|---|---|
| Distributed Cache | Cache hierarchy, eviction policies, write strategies, stampede prevention | Netflix EVCache, Google cache infra, Twitter Twemcache |
| Leader Election | Consensus vs election, etcd/ZK/K8s patterns, lease vs epoch-based | Google Chubby, Apache ZooKeeper, etcd (Kubernetes), HashiCorp Consul |
| Distributed Queue | Point-to-point, pub-sub, partitioning, delivery semantics, backpressure | LinkedIn Kafka, Amazon SQS, Google Pub/Sub, RabbitMQ |
| Consistent Hashing | Ring hashing, virtual nodes, rendezvous hashing, rebalancing | Amazon Dynamo, Discord voice, Akamai CDN, Cassandra |
| Consensus | CAP theorem, FLP impossibility, Paxos, Raft, PBFT, quorum sizing | Google Chubby (Paxos), etcd (Raft), Consul (Raft), ZooKeeper (Zab) |
Each pattern directory contains:
index.md— explanation, architecture diagrams (Mermaid), and minimal code snippetsexamples/— runnable Python and Go implementations
- Python 3.10+ with type hints
- Go 1.21+ with standard library where possible
- Mermaid for architecture diagrams