Consensus (computer science)
From Wikipedia, the free encyclopedia
Consensus is a problem [1] in distributed computing that encapsulates the task of group agreement in the presence of faults.[2] In particular, any process in the group may crash at any time. Consensus is fundamental to core techniques in fault tolerance, such as state machine replication.
Contents |
[edit] Problem Description
A process is called "correct" if it does not fail at any point during its execution. Unlike Terminating Reliable Broadcast, the typical Consensus problem does not label any single process as a "sender". Every process "proposes" a value; the goal of the protocol is for all correct processes to choose a single value from among those proposed. A process may perform many I/O operations during protocol execution, but must eventually "decide" a value by passing it to the application on that process that invoked the Consensus protocol.
Valid consensus protocols must provide important guarantees to all processes involved. All correct processes must eventually decide the same value, for example, and that value must be one of those proposed. A correct process is therefore guaranteed that the value it decides was also decided by all other correct processes, and can act on that value accordingly.
More precisely, a Consensus protocol must satisfy the four formal properties below.
- Termination: every correct process decides some value.
- Validity: if all processes propose the same value v, then every correct process decides v.
- Integrity: every correct process decides at most one value, and if it decides some value v, then v must have been proposed by some process.
- Agreement: if a correct process decides v, then every correct process decides v.
The possibility of faults in the system makes these properties more difficult to satisfy. A simple but invalid Consensus protocol might have every process broadcast its proposal to all others, and have a process decide on the smallest value received. Such a protocol, as described, does not satisfy Agreement if faults can occur: if a process crashes after sending its proposal to some processes, but before sending it to others, then the two sets of processes may decide different values.
[edit] Impossibility
[edit] Important Consensus Protocols
Paxos algorithm is used by Google in their Chubby distributed lock service.
[edit] Context in Distributed Computing
[edit] References
- ^ Olfati-Saber, Reza (2004). Consensus Problems in Networks of Agents with Switching Topology and Time-Delays. Retrieved on September 1, 2004.
- ^ Alvisi, Lorenzo (2006). Consensus and Reliable Broadcast. Retrieved on May 21, 2006.