Home Knowledge Base Distributed Consensus Protocols

Distributed Consensus Protocols is the family of algorithms that enable a group of distributed processes to agree on a single value or sequence of decisions despite individual process failures, message delays, and network partitions — the foundational problem of distributed systems whose solution enables everything from replicated databases (etcd, CockroachDB), distributed coordination services (ZooKeeper), blockchain, and fault-tolerant storage systems to function correctly. The correctness of consensus algorithms (safety: all nodes agree on the same value; liveness: agreement is eventually reached) is the bedrock of distributed system reliability.

The Consensus Problem

Paxos

Raft

Raft Election

All start as Followers
    ↓ (election timeout, no heartbeat received)
Candidate: Vote for self, send RequestVote to all
    ↓ (receive majority votes)
Leader: Send heartbeats, replicate log
    ↓ (network partition, stale term)
Follower: Revert to follower if higher term seen

Paxos vs. Raft

AspectPaxosRaft
UnderstandabilityDifficultMuch easier
Leader electionImplicitExplicit
Log matchingComplex proofClear invariants
Membership changeRequires extensionBuilt-in joint consensus
Industry useGoogle Chubby, Spanneretcd, CockroachDB, TiKV

Byzantine Fault Tolerance (BFT)

etcd and Raft in Practice

Performance and Latency

Consensus in Databases

Distributed consensus protocols are the algorithmic bedrock of reliable distributed computing — every fault-tolerant database, configuration management system, container orchestration platform, and blockchain relies on consensus to transform a collection of individual, failure-prone machines into a system that collectively behaves as a single reliable entity, making consensus algorithms among the most practically consequential computer science contributions of the past four decades, studied in every serious distributed systems course and implemented in the infrastructure that underlies cloud computing at global scale.

distributed consensus protocolpaxosraft consensusbyzantine fault toleranceconsensus algorithmdistributed agreement

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.