Open In App

Agreement Protocol in Distributed Systems

Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisites: What is a Distributed System?

In distributed systems, to achieve a common goal, it is required that sites reach a mutual agreement. In an example, data managers at each site must agree on whether to commit or to abort the transaction. In the agreement problems, non-faulty processors in a distributed system should be able to reach a common agreement even if certain components in the system are faulty.

A basic tool for ensuring coordination and consistency in a distributed system is an agreement protocol. Many nodes in a distributed system must collaborate to achieve a similar goal, yet due to network delays and faults, separate nodes may have different perspectives of the system state.

An agreement protocol’s purpose is to ensure that all nodes in the system finally reach the same decision, even if some nodes fail or act maliciously. There are various forms of agreement protocols, but the consensus protocol is the most well-known and commonly utilised.

Model of Processor Failures 

Processor failures can occur for a variety of causes, including hardware defects, software errors, power supply issues, overheating, and so on. Processor failures in distributed systems can be categorized into numerous models, each of which assumes different failure characteristics of processors. The following are some of the most often used models of processor failure in distributed systems:

  • Fail-stop model: A processor fails in this model by ceasing to respond to any communication or activity. It is anticipated that a failing processor would remain dormant and will not reply to any further messages. This is the most popular and straightforward failure model in distributed systems.
  • Crash failure model: In this model, a processor fails by not responding to any communication or activity, but it may still perform certain internal computations. A crashed processor is thought to be unresponsive to messages, although it can recover and rejoin the system.
  • Byzantine failure model: In this paradigm, a processor can fail in any way it sees fit, such as sending wrong or malicious messages or behaving arbitrarily. In distributed systems, Byzantine failures are the most severe and complex to handle. Malicious fault are broad in nature and are Byzantine faults.

These failure models are used in the design of fault-tolerant algorithms and protocols to ensure that the system continues to function properly even if a processor fails. Each model has its own set of fault tolerance assumptions and constraints, and different models may be appropriate for different sorts of applications or systems.

Classification of Agreement Protocol 

Byzantine Agreement Problem: The Byzantine agreement problem necessitates that a single value be agreed upon by all non-faulty processors, with the initial value chosen by an arbitrarily chosen processor. The source processor broadcasts this initial value to all other processors, and the solution must assure agreement on the same value among all non-faulty processors, with the exception that if the source processor is not faulty, the agreed-upon value must match the source’s initial value. In the event that the source processor is faulty, non-faulty processors can agree on any common value, regardless of what faulty processors agree on or agree on at all.

The Consensus Problem: Each processor has its own initial value in the Consensus issue, and non-faulty processors must agree on a single, common value. Each processor sends out a broadcast its starting value to all other processors, which may be different, and the solution must assure agreement on the same single value across all non-faulty processors. If the initial values are different, all non-faulty processors can agree on any common value. The values reached by defective processors are meaningless.

Interactive Consistency Problem: The Interactive consistency problem necessitates the agreement of all non-faulty processors on a set of common values, each with its unique initial value. Each CPU broadcasts its initial value to all other processors, and the solution must assure agreement on the same vector across all non-faulty processes (V1, V2, …… , Vn). If the ith processor is not defective and its initial value is vi, then the ith value that all non-faulty processors must agree on must be vi. If the jth processor is malfunctioning, the remaining processors can agree on any common value for vj.

 

Comparison of Agreement Protocols in Distributed Systems

Agreement Protocol  Purpose  Failure Model  Requirements
Byzantine Agreement  Agree upon a single value among all non-faulty nodes  Byzantine failure model  Each node must broadcast an initial value, and the solution must ensure agreement on the same value among all non-faulty nodes.
Consensus  Agree upon a single common value among all nodes  Fail-stop or Crash failure model  Each node has its own initial value, and the solution must ensure agreement on the same value among all non-faulty nodes.
Interactive Consistency  Agree on a set of common values with unique initial values  Fail-stop or Crash failure model  Each node broadcasts its initial value, and the solution must ensure agreement on the same vector among all non-faulty nodes.

Last Updated : 15 May, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads