What the network can't promise: latency, loss and partitions
Every arrow you draw between two boxes is a network call, and a network call can be slow, can vanish, or can succeed without you ever hearing back. Designs that assume otherwise fail in ways that are hard to debug: double charges, two leaders, requests that hang forever. Interviewers listen for whether you plan for this out loud.
Texting a friend on a train
You text a friend who's on a train that keeps going through tunnels. Sometimes your message arrives in a second, sometimes in ten minutes. Sometimes it never arrives. In a long tunnel, both phones work fine but can't reach each other. And when no reply comes, you can't tell whether your message was lost, their reply was lost, or they're just busy. So you text again, and they might get your question twice.
- the varying delivery time → latency: never zero, and sometimes far above normal
- the text that never arrives → loss: of the request, or of the reply
- the tunnel → a partition: machines that are running but can't reach each other
- no reply, no idea why → a timeout tells you nothing about what happened
- the second text → retries, which can cause duplicates