First Principles
$ man system-design
10 posts
- 01 The Hash Ring
Why hash(key) % N breaks when servers change, and how a ring fixes everything.
- 02 The Replica
One copy of your data is a single point of failure. Here's how replicas stay alive and (eventually) agree.
- 03 The Shard
One machine can't hold everything. Here's how you split data across many, and what goes wrong when you do.
- 04 The Consensus
Five nodes, one truth. How distributed systems agree on anything, and what happens when they can't.
- 05 The Consistency
Your read returned 42. Is that the latest value, the value from a second ago, or something that was never written? Consistency models determine the answer.
- 06 The Cache
The fastest read is the one that never hits the database. But keeping a cache correct is harder than it looks.
- 07 The Balancer
Ten servers, a thousand requests per second. Something has to decide who handles what.
- 08 The Throttle
Your API can handle 1000 requests per second. Request 1001 needs an answer too, and that answer is 429.
- 09 The Engine
Every database sits on a storage engine. The engine decides whether your reads or your writes pay the performance tax.
- 10 The Queue
Not everything needs an answer right now. Message queues turn synchronous pressure into asynchronous flow.