Consensus (computer science)

From Wikipedia, the free encyclopedia

Jump to: navigation, search

Consensus is a problem in distributed computing that encapsulates the task of group agreement in the presence of faults.[1]

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

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.

Consensus has been shown to be impossible to solve in several models of distributed computing.

In an asynchronous system, where processes have no common clock and run at arbitrarily varying speeds, the problem is impossible to solve if one process may crash and processes communicate by sending messages to one another [2]. The technique used to prove this result is sometimes called an FLP impossibility proof, named after its creators, Michael J. Fischer, Nancy A. Lynch and Michael S. Paterson, who won the Dijkstra Prize for this result. The technique has been widely used to prove other impossibility results. For example, a similar proof can be used to show that consensus is also impossible in asynchronous systems where processes communicate by reading and writing shared variables if one process may crash [3].

The FLP result does not state that consensus can never be reached: merely that under the model's assumptions, no algorithm can always reach consensus in bounded time. There exist algorithms, even under the asynchronous model, that can reach consensus with probability one. The FLP proof hinges on demonstrating the existence of an order of message receipts that causes the system to never reach consensus. This "bad" input however may be vanishingly unlikely in practice.

In a synchronous system, where all processes run at the same speed, consensus is impossible if processes communicate by sending messages to one another and one third of the processes can experience Byzantine failures[4].

Paxos algorithm is used by Google in their Chubby distributed lock service.

  1. ^ Lamport, Leslie; Marshall Pease and Robert Shostak (April 1980). "Reaching Agreement in the Presence of Faults". Journal of the ACM 27 (2): 228--234. 10.1145/322186.322188. Retrieved on 2007-07-25. 
  2. ^ Fischer, Michael J.; Nancy A. Lynch; Michael S. Paterson (April 1985). "Impossibility of Distributed Consensus with One Faulty Process". Journal of the ACM 32 (2): 374-382. Retrieved on 2007-04-29. 
  3. ^ Loui, M. C. & Abu-Amara, H. H. (1987), "Memory requirements for agreement among unreliable asynchronous processes", in Preparata, F. P., Advances in Computing Research, vol. 4, Greenwich, Connecticut: JAI Press, pp. 163-183
  4. ^ Fischer, Michael J.; Nancy A. Lynch; Michael Merritt (1986). "Easy impossibility proofs for distributed consensus problems". Distributed Computing 1 (1): 26-39. Springer. doi:10.1007/BF01843568. 


Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.