The two generals can never be sure
Distributed systems · Core
Over a link that can lose messages, no finite exchange of messages lets two parties be certain they agree.
Try this
Send three messengers, then capture the last one. Ask yourself what its sender now knows.
Why it matters
It is why "exactly-once delivery" cannot be promised by a network alone, and why real systems use retries plus idempotent operations.
The proof
Suppose some protocol lets the generals agree after a fixed number of messages. Take the shortest such protocol, and look at its last message.
Its sender acts without knowing whether it arrived. So the protocol must also work if it is lost, and then that message was not needed.
Remove it and you have a shorter protocol that works, which contradicts "shortest". So no finite protocol exists.
Engineers live with it: acknowledge, retry with timeouts, and make every operation safe to repeat. Agreement becomes very likely, never certain.
Sources
- Some constraints and tradeoffs in the design of network communications, E. A. Akkoyunlu, K. Ekanadham, R. V. Huber, 1975
- Notes on Data Base Operating Systems, Jim Gray, 1978