Home Knowledge Base Distributed Consensus Algorithms

Distributed Consensus Algorithms are the fundamental protocols that enable multiple nodes in a distributed system to agree on a single value (or sequence of values) despite node failures, network partitions, and message delays — providing the consistency guarantees that underpin replicated databases, distributed lock services, leader election, and configuration management in every production distributed system from Google Spanner to etcd to Apache ZooKeeper.

The Consensus Problem

N nodes must agree on a value. Requirements:

Paxos (Lamport, 1989)

The foundational consensus protocol:

Multi-Paxos extends single-decree Paxos to a log of decisions: a stable leader drives consensus for each log entry without repeating the Prepare phase, achieving one round-trip per decision in the common case.

Raft (Ongaro & Ousterhout, 2014)

Designed for understandability (Paxos is notoriously difficult to implement correctly):

Raft is used in: etcd (Kubernetes backing store), CockroachDB, TiKV, Consul, and dozens of production systems.

Performance Characteristics

MetricPaxos/RaftImpact
Latency (LAN)1-5 ms per decisionLimited by disk fsync + network RTT
Latency (WAN)50-200 msLimited by cross-datacenter RTT
Throughput10K-100K decisions/secBatching amortizes per-decision overhead
AvailabilityRequires majority (3/5, 2/3)Tolerates minority failures

Byzantine Fault Tolerance (BFT)

Paxos and Raft assume crash failures (nodes stop but don't lie). BFT protocols (PBFT, HotStuff, Tendermint) tolerate Byzantine failures (nodes may send arbitrary/malicious messages). Require 3f+1 nodes for f Byzantine failures. Used in blockchain consensus, military/aerospace systems.

Distributed Consensus is the theoretical and practical foundation of reliable distributed systems — the algorithmic guarantee that a collection of unreliable machines can provide the illusion of a single, consistent, fault-tolerant service that never loses acknowledged data.

distributed consensus algorithmpaxos raft protocoldistributed agreementconsensus replicationfault tolerant consensus

Explore 500+ Semiconductor & AI Topics

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