designing-data-intensive-applications-the-big-ideas-behind
Installation
SKILL.md
Core Mental Models
1. The Fault/Error/Failure Hierarchy
Principle: Faults (component deviations) are inevitable; your job is preventing them from becoming failures (user-visible problems).
- Fault: Disk fails, network drops packets, process crashes (EXPECT THIS CONSTANTLY)
- Error: System detects the fault (checksums fail, timeouts fire, exceptions raised)
- Failure: User-visible problem (request fails, data corrupted, service unavailable)
Design implication: Build systems where faults are contained and recoverable. Netflix's Chaos Monkey deliberately injects faults because systems that never practice recovery can't do it when needed. Fault tolerance beats fault prevention.
How to apply: Instead of asking "how do we prevent X from failing?", ask "when X fails (it will), how do we ensure users don't notice?" Use supervision trees, circuit breakers, health checks, and automatic failover.
2. Load Parameters: The Hidden Dimension
Principle: Scalability depends entirely on which parameter dominates your workload—and you often can't predict this without measurement.
Twitter example:
- 12,000 tweets/sec is easy (writes scale horizontally)
- Distribution to followers is hard (some users have 30M followers = 30M writes per tweet)
- The "fan-out" parameter determined architecture, not write throughput