Skip to content
Related Articles

Related Articles

Improve Article
Distributed Consensus in Distributed Systems
  • Last Updated : 21 Jan, 2021

A procedure to reach a common agreement in a distributed or decentralized multi-agent platform. It is important for the message passing system.

Example – 

A number of processes in a network decide to elect a leader. Each process begins with a bid for leadership. In traditional or conventional distributed systems, we apply consensus to ensure reliability and fault tolerance. It means, in a decentralized environment when you have multiple individual parties, and they can make their own decision, then it may happen that some node or some parties are working maliciously or working as a faulty individual.  So in those particular cases, it is important to come to a decision or common point of view. So having a common point of view in an environment where people can behave maliciously or people can crash the work in a faulty way, is the main difficulty. So under this kind of distributed environment, our objective is to ensure reliability which means to ensure correct operation in the presence of faulty individuals.

Features :    

  • It ensures reliability and fault tolerance in distributed systems.
  • In the presence of faulty individuals, it is Ensure correct operations.

Examples – 



Commit a transaction in a database, State machine replication, Clock synchronization.

How to achieve distributed consensus :

There are some conditions that need to be followed in order to achieve distributed consensus.

  • Termination –
    Every non-faulty process must eventually decide.
  • Agreement –
    The final decision of every non-faulty process must be identical.
  • Validity –
    Every non-faulty process must begin and ends with the same value.
  • Integrity –
    Every correct individual decides at most one value, and the decided value must be proposed by some individual.

Here is one validation criterion, So basically we should reach a decision with a value that must be the initial value of some process because it is silly to reach an agreement when the agreed value reflects nobody’s initial choice.

The correctness of Distributed Consensus Protocol :   

It can be described by the following two properties as follows.

  • Safety Property –
    It ensures that you will never converge to an incorrect value or correct individuals in a network will never converge to an incorrect value.
  • Liveness Property –
    It states that every correct value must be accepted eventually which means something good will eventually happen.

Application of Distributed Consensus :    

  • Leader election in a fault-tolerant environment for initiating some global action without introducing a single point of failure.
  • Maintaining consistency in a distributed network. Suppose you have different nodes monitoring the same environment. If one of the nodes crashes, a consensus protocol ensures robustness against such faults.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

 

My Personal Notes arrow_drop_up
Recommended Articles
Page :