Make money doing the work you believe in

The "Two Generals" Problem, explained in 30 seconds.

Two armies need to attack a city at the same time. They communicate by sending messengers through enemy territory. The messenger might get captured.

General A sends: "Attack at dawn." Did General B receive it? A doesn't know.

General B sends back: "Got it. Attacking at dawn." Did General A receive the confirmation? B doesn't know.

They can send confirmations of confirmations forever. Neither side can ever be 100% certain.

This is why distributed systems can never achieve perfect agreement over an unreliable network. It's mathematically impossible.

Every consensus algorithm, from Paxos to Raft, is an engineering workaround for this fundamental limit. They don't solve it. They make it tolerable.

When you discuss coordination between services in interviews, acknowledging this constraint makes you sound like someone who understands distributed systems at a deep level.

Follow-up: How does TCP "solve" this problem for everyday networking? Hint: it doesn't really solve it. It just makes a practical trade-off. What is it?

May 13
at
3:25 AM
Relevant people

Log in or sign up

Join the most interesting and insightful discussions.