System Design
Load Balancing Doesn’t Balance Load
Load Balancing Doesn’t Balance Load
System Design
Load Balancing Doesn’t Balance Load
System Design
Designing Retries Without Taking Down Your System
System Design
Two services that share a database are one service pretending to be two.
System Design
In a distributed system, DELETE is not a command. It's a request.
System Design
Observers
System Overview Observer Analysis Tweet Author (Initiator) Type: Initiator Time: How long from posting until they know the tweet exists? Then, distribution latency. How long until followers can see it? Wrongness tolerance: Cannot tolerate lost tweets—posted but never persisted. Cannot tolerate ambiguity—did it post or not? Can tolerate
Let's now put our framework for System Design into practise. I'll try and be as comprehensive for the sake of clarity. System Overview Observers Rider Type: Initiator Time: Acknowledgment latency. How long from requesting until knowing a driver is assigned? Wrongness tolerance: Cannot tolerate ambiguity—must
Pressure: Why Systems Break Now Pressure is not traffic. Not queries per second. Not concurrency or peak load. Those are measurements. Pressure is the rate at which expectations are created relative to the system's ability to resolve or absorb wrongness. A low-traffic system can be under extreme
Wrongness: What Each Observer Tolerates Wrongness is not bugs or errors or incorrect data. Those are manifestations. Wrongness is the distance between what an observer expected and what they encountered—a distance that exceeds what they can tolerate. Every observer has a tolerance band. Within the band, deviations are acceptable.
Time: The Debt You Redistribute Time is the gap between when an observer forms an expectation and when they evaluate whether reality matched it. Each observer tolerates a different gap. This is why temporal conflicts are inevitable. Initiators live in immediate time. An initiator takes an action and starts waiting.
All system design problems reduce to managing how time, wrongness, and pressure are perceived by their observers. An observer is anything that forms expectations about the system and reacts when those expectations are violated. It expects something to happen. It changes behavior when that expectation isn't met. If
The better you get at pattern-matching system design answers, the worse you get at actually designing systems. This sounds wrong. It's not. You've witnessed the moment it falls apart. Perhaps you've lived it yourself. The interviewer says "Design a rate limiter."