Forge Capsule

Distributed Systems: Consensus Algorithms and CAP Theorem

CAP theorem: a distributed system can guarantee at most 2 of: Consistency, Availability, Partition tolerance. Paxos: leader election, prepare/promise/accept/commit phases. Raft: leader election by term, log replication, majority quorum. ZooKeeper: Apache coordination service, ZAB protocol. etcd: Raft-based key-value store used by Kubernetes. Byzantine fault tolerance: BFT requires 3f+1 nodes to tolerate f Byzantine failures. PBFT (Practical BFT): O(n²) message complexity. Tendermint: BFT consensus for blockchains. CRDT (Conflict-free replicated data types): G-counter, PN-counter, LWW register. Vector clocks: causality tracking. Lamport timestamps. Two-phase commit (2PC): coordinator + participants, blocking fa...

Loading capsule...