Unit content
Distributed consensus
A consensus problem asks several nodes to choose one value despite failures and message delay.
A correct consensus protocol separates two kinds of requirements:
- safety: nodes do not decide conflicting values and any decided value satisfies the protocol's validity rule;
- liveness: under the stated timing and failure assumptions, nodes eventually make progress.
Safety must survive unlucky message orderings, retries and node crashes. Liveness depends on stronger assumptions about which nodes remain reachable and how long communication can be delayed.
Consensus is the coordination primitive behind tasks such as choosing one leader or agreeing on the next entry in a replicated log.
It is not ordinary majority voting performed once: votes and decisions must remain coherent across retries, failures and participants that recover with old state.