system-design-primer

simulation 06the network splits

A replicated store behind your servers, and at six seconds the network cuts it in two. Both halves are alive and healthy; neither can see the other. This is a payments ledger, so a read that is out of date is not an acceptable answer. Choose what the system does when it cannot have both.

pass when
error rate ≤ 8% · p99 ≤ 400ms · spend ≤ $560 · stale reads ≤ 0

The simulation reads best on a wider screen — the topology is drawn left to right.

Ready to run.

served
0
dropped
0
error rate
0.0%
p99
0ms
stale
0
in flight
0
when the network splits

AP — every replica keeps answering, so nothing errors. But the cut-off side has stopped receiving writes, so some of what it returns is behind. Those count against the stale meter.

build
spend$240 / $560

Capacity is never free. Passing under budget is the whole exercise.