Two Generals' Problem
Updated 2026-07-28
Summary
In computing, the Two Generals' Problem (or Chinese Generals Problem) is a thought experiment meant to illustrate the pitfalls and design challenges of attempting to coordinate an action by communicating over an unreliable link. In the experiment, two generals are only able to communicate with one another by sending a messenger through enemy territory. The experiment asks how they might reach an agreement on the timing of an attack.
Definition
In computing, the Two Generals' Problem (or Chinese Generals Problem) is a thought experiment meant to illustrate the pitfalls and design challenges of attempting to coordinate an action by communicating over an unreliable link. In the experiment, two generals are only able to communicate with one another by sending a messenger through enemy territory. The experiment asks how they might reach an agreement on the timing of an attack.
Introduction
How to use
In computing, the Two Generals' Problem (or Chinese Generals Problem) is a thought experiment meant to illustrate the pitfalls and design challenges of attempting to coordinate an action by communicating over an unreliable link. In the experiment, two generals are only able to communicate with one another by sending a messenger through enemy territory. The experiment asks how they might reach an agreement on the timing of an attack.
Mechanism
On an unreliable channel, the sender can never be certain that the receiver has received the message, because the acknowledgment itself must be sent back over the same unreliable channel, leading to infinite recursion. Formally, it can be proven that no matter how many rounds of acknowledgment, it is impossible to achieve a consensus that both parties are 100% certain of—this is an unsolvable problem (related to but distinct from the Byzantine Generals Problem, which also introduces malicious nodes).
Practice
In progress 0/5Practice this model in one real situation:
Cases
- - In distributed systems, nodes cannot confirm each other's state; use timeouts and quorum to approximate consistency; use idempotent retries rather than strong consistency between microservices. - On the battlefield, messengers may be captured; instead, coordinate using agreed-upon times and signals.
Common pitfalls
- - Believing that 'sending one more acknowledgment will make it safe'—the acknowledgment chain never closes; confusing the Two Generals' Problem with the Byzantine Generals Problem (which involves malicious nodes). - Assuming that availability and consistency can always be achieved simultaneously (ignoring the trade-offs of the CAP theorem).
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Two_Generals%27_Problemverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.