Fundamentals 10 min read

Understanding CAP, Byzantine Fault Tolerance, PBFT, Paxos, and Raft Consensus Algorithms

This article explains the CAP theorem, illustrates the Byzantine Generals problem, and provides detailed overviews of PBFT, Paxos (including Multi‑Paxos), and Raft consensus algorithms, highlighting their phases, roles, and practical considerations for achieving consistency in distributed systems.

Big Data Technology & Architecture
Big Data Technology & Architecture
Big Data Technology & Architecture
Understanding CAP, Byzantine Fault Tolerance, PBFT, Paxos, and Raft Consensus Algorithms

In distributed systems the CAP theorem states that consistency, availability and partition tolerance cannot be simultaneously guaranteed, prompting the need for consistency mechanisms.

The classic Byzantine Generals problem illustrates the difficulty of achieving agreement when some nodes may act maliciously, leading to Byzantine Fault Tolerance (BFT) solutions.

Practical Byzantine Fault Tolerance (PBFT) is a state‑machine replication protocol with O(N^2) complexity that operates in three phases— Pre-Prepare, Prepare and Commit —using primary and backup replicas within a rotating view, where the primary is selected by p = v mod |R|.

Non‑Byzantine consensus algorithms such as Paxos achieve agreement in asynchronous crash‑fault environments; Paxos uses Proposer and Acceptor roles, a two‑phase PrepareRequest / PrepareResponse and AcceptRequest / AcceptResponse process, and can be extended to Multi‑Paxos for continuous log replication.

Raft simplifies consensus by decomposing it into leader election, log replication, safety, log compaction and membership changes, using Leader, Follower and Candidate roles, and is widely adopted in production systems.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Distributed SystemsRaftConsensusByzantine Fault TolerancePaxosPBFT
Big Data Technology & Architecture
Written by

Big Data Technology & Architecture

Wang Zhiwu, a big data expert, dedicated to sharing big data technology.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.