Graph
Consensus

🤝Consensus

NEW

A process in distributed systems that enables nodes to agree on a single value or sequence of values despite failures.

DESCRIPTION

Consensus underpins coordination in distributed databases, logs, and service orchestration. Algorithms like Paxos and Raft achieve agreement using quorums, leader election, and replicated state machines. Some variants handle crash faults; others tolerate Byzantine behavior. Consensus trades availability or latency for strong consistency in failure scenarios. It is foundational for metadata stores, configuration services, and replicated logs.

ALTERNATIVE DEFINITIONS

Wikipedia

A consensus algorithm is a process in computer science used to achieve agreement on a single data value among distributed processes or systems.

Emphasizes agreement across distributed processes.

Source

Raft

Raft is a consensus algorithm for managing a replicated log that is designed to be easy to understand.

Highlights replicated logs and understandability as goals.

Source

Paxos Raft Byzantine Fault Tolerance Quorum Leader Election Replication CAP Theorem ZooKeeper

COMPETING TERMS

Eventual Consistency

RELATIONS

KNOWLEDGE AREAS

Infrastructure Data Engineering Real-time & Streaming Data Software Engineering

TARGET AUDIENCE

Software Developer Data Engineer DevOps Engineer Cloud Architect Solution Architect

EXTERNAL SOURCES

  • Wikipedia - Consensus (computer science)
  • Raft - Original Raft consensus paper
  • Paxos - Paxos resources and explanations
  • etcd - Why consensus for key-value stores

TOP QUESTIONS

Why is Consensus important in data systems?

It ensures consistent agreement on state across nodes, enabling reliable replication, leader election, and fault-tolerant coordination.

Category: Relevancy

What is the difference between Paxos and Raft Consensus?

Both achieve consensus; Raft prioritizes understandability and prescribes leader election, while Paxos is minimalistic and more abstract.

Category: Alternatives

Does Consensus sacrifice availability?

Often yes under network partitions, due to CAP trade-offs. Majority quorums can block writes when insufficient nodes are available.

Category: Risks

Where is Consensus used?

Metadata services, distributed databases, replicated logs, service discovery, and configuration management use consensus for correctness.

Category: Example

What are common mistakes with Consensus implementations?

Ignoring timeouts, clock skew, and network partitions leads to split-brain or liveness bugs.

Category: Mistakes

Is Byzantine Fault Tolerant Consensus necessary for most systems?

Usually not. Crash fault-tolerant protocols like Raft suffice unless adversarial faults are expected.

Category: Opinion

How do quorums relate to Consensus?

Quorums ensure overlapping majorities so that any two decisions intersect, preserving safety across failures.

Category: Example

What is a hot topic around Consensus?

Reconfigurable membership, hierarchical quorums, and WAN-optimized protocols are active areas.

Category: Topic

How to start learning Consensus?

Read the Raft paper, implement a toy Raft log, and explore etcd or ZooKeeper documentation.

Category: Requirements