
Consistency models and Raft consensus

Distributed databases with Peter Mattis
Topic 10 of 13
Published Sep 30, 2026 · Clip 55:32–1:02:45 (7:13)
Peter explains ACID properties, isolation levels, serializability and linearizability, and why weaker/eventual consistency — e.g., reading a secondary replica before the write propagates — burdens application developers with possible bugs like double-spending. He explains that CockroachDB writes to all replicas but does it efficiently. He then covers consensus: two replicas cannot achieve consensus, three are the minimum, Raft as a variant of Paxos, how writes go to all replicas and consensus reads occur on crash recovery, CockroachDB's typical three replicas (five for system tables or durability-sensitive customers), and cross-region speed-of-light latency tradeoffs.