0% found this document useful (0 votes)
26 views4 pages

Nikil DS Report

The seminar report discusses consensus in distributed systems, emphasizing its importance for applications like replicated databases and blockchain networks. It outlines the definition of consensus, challenges such as crash and Byzantine failures, and various consensus algorithms including Two-Phase Commit, Paxos, and Raft. Additionally, it addresses related problems like Byzantine agreement and leader election, highlighting the significance of consensus in ensuring consistency and fault tolerance in distributed systems.

Uploaded by

Vinay N
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

Nikil DS Report

The seminar report discusses consensus in distributed systems, emphasizing its importance for applications like replicated databases and blockchain networks. It outlines the definition of consensus, challenges such as crash and Byzantine failures, and various consensus algorithms including Two-Phase Commit, Paxos, and Raft. Additionally, it addresses related problems like Byzantine agreement and leader election, highlighting the significance of consensus in ensuring consistency and fault tolerance in distributed systems.

Uploaded by

Vinay N
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI-590018

Distributed System

Seminar report

On

“ Consensus and Related Problems in Distributed Systems ”

Submitted by

NIKIL R – 1ST22IS033

Under the Guidance of


Mrs. Sowmyashree
Assistant Professor, Dept. Of ISE

DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING


SAMBHRAM INSTITUTE OF TECHNOLOGY

M.S.Palya, Vidyaranyapura, Bangalore-560097

2024-2025
Consensus and Related Problems in Distributed Systems

Consensus in Distributed Systems

Consensus is a fundamental problem in distributed systems where a group of processes must


agree on a single value, despite failures and other challenges. Consensus is critical in
applications like replicated databases, distributed transaction systems, and blockchain
networks.

Definition of Consensus

Consensus protocols ensure that all correct processes agree on the same value, satisfying the
following properties:

1. Agreement: All correct processes must agree on the same value.


2. Validity: If a correct process proposes a value, the agreed value must be one of the
proposed values.
3. Termination: Every correct process must eventually decide on a value.

Challenges in Achieving Consensus


Failures in Distributed Systems

1. Crash Failures: Processes may stop functioning unexpectedly.


2. Byzantine Failures: Malicious processes may send conflicting or incorrect
information to disrupt the system.

Impossibility of Consensus in Asynchronous Systems (FLP Theorem)

In purely asynchronous distributed systems, consensus cannot be guaranteed if even one


process may fail. This result highlights the need for timing assumptions or additional failure
detectors to achieve consensus.

Consensus Algorithms

Two-Phase Commit (2PC)

1. Used in distributed databases to coordinate transactions.


2. Phases:
1. Prepare Phase: Coordinator asks participants to prepare to commit or
abort.
2. Commit Phase: If all participants are prepared, the transaction is
committed. Otherwise, it is aborted.
3. Drawback: Blocking occurs if the coordinator fails.

Three-Phase Commit (3PC)

1. Extends 2PC by adding an intermediate phase to avoid blocking.


2. Phases:
1. Prepare Phase: Similar to 2PC.
2. Pre-Commit Phase: Participants acknowledge readiness.
3. Commit Phase: Transaction is committed based on acknowledgments.
3. Advantage: Non-blocking even if the coordinator fails.

Paxos Algorithm

1. Designed for consensus in asynchronous systems with crash failures.


2. Roles:
1. Proposers: Propose values.
2. Acceptors: Decide on values based on quorum.
3. Learners: Learn the decided value.
3. Phases:

1. Prepare Phase: Proposer sends a prepare request to acceptors.


2. Accept Phase: Acceptors respond with promises and accept proposed
values.

4. Properties: Fault-tolerant but complex to implement.

Raft Algorithm

5. Simplifies consensus for better understandability compared to Paxos.


6. Leader Election: Ensures one leader to manage log replication.
7. Log Consistency: Ensures a consistent order of operations across all nodes.
8. Applications: Used in distributed systems like etcd and Consul.

Byzantine Fault Tolerance (BFT)

1. Handles arbitrary (Byzantine) failures, ensuring consensus even with malicious


nodes.
2. Examples:
1. Practical Byzantine Fault Tolerance (PBFT): Optimized for partially
synchronous systems.
2. Blockchain protocols like Proof of Work (PoW) and Proof of Stake (PoS)
address Byzantine failures in decentralized networks.

Related Problems
Byzantine Agreement

Byzantine agreement is a form of consensus where processes must agree despite arbitrary
behavior by some nodes.

 Conditions for Agreement:

1. Agreement on a single value.


2. Validity of the agreed value.
3. Tolerance for up to ⌈ n−13⌉ \lceil \frac{n-1}{3} \rceil⌈ 3n−1​ ⌉ Byzantine
failures, where nnn is the number of processes.

Leader Election

 Determines a single process to act as the coordinator for consensus or other operations.
 Algorithms:

o Ring-based Election: Processes compare identifiers in a logical ring.


o Bully Algorithm: Higher-identifier processes dominate and take leadership
roles.

Atomic Broadcast

Atomic broadcast ensures that all correct processes receive messages in the same order, a
key requirement for consensus.

 Relation to Consensus: Consensus can be used to implement atomic broadcast, where


deciding the next message in the sequence is equivalent to reaching consensus.

Applications of Consensus

Replicated Databases

o Ensures consistent updates across replicas.


o Example: Leader-based replication uses consensus for log consistency.

Blockchain and Cryptocurrency

o Consensus protocols like PoW and PoS ensure agreement on transaction blocks
in a decentralized network.

Distributed Coordination Systems

o Systems like Apache ZooKeeper rely on consensus for leader election and
configuration management.

Fault-Tolerant Systems

o Consensus enables recovery from process failures without inconsistent states.

You might also like