map / distributed-systems
Pillar 03 · 7 principles
Distributed Systems.
Everything fails, and it fails partially.
System design interviews reward people who reason from a few laws — queueing, probability, quorums — instead of reciting architectures. These are those laws.
Queueing & Little’s Law
Latency doesn’t grow linearly with load: as utilization approaches 100%, wait time grows without bound.
Drag utilization and watch latency explode.
Availability math
Dependencies in series multiply their availabilities down; redundant copies in parallel multiply their failure probabilities down.
Nines adding up (and draining away) through serial vs parallel dependencies.
Replication & quorums
If every read quorum overlaps every write quorum (R + W > N), a read is guaranteed to see the latest acknowledged write.
N replicas with adjustable R and W, highlighting the overlap.
Consensus (Raft)
A majority quorum means any two majorities share a member, so a cluster can agree on one leader and one log despite failures.
A step-through Raft leader election with terms, votes, and a partitioned node.
Consistency models
Consistency models are promises about which values a read may return; stronger promises cost coordination, and coordination costs latency.
The same history of reads and writes judged under linearizable, sequential, and eventual consistency.
Partitions
When the network splits, a system must choose between refusing some requests and risking divergent answers.
A cluster split in two, toggling between “stay available” and “stay consistent”.
Retries & cascades
Retries multiply load exactly when a system is weakest, so without budgets and backoff they turn a slowdown into an outage.
A retry storm amplifying load across layers, then tamed by backoff, jitter, and retry budgets.
How it shows up in interviews
- System design: capacity, SLOs, and designing for failure.
- “What happens when this dependency gets slow?”
- Error budgets and the arithmetic behind “nines”.