Concept
Raft consensus
Definition
A leader-based consensus protocol: one leader appends an ordered log and commits an entry once a majority has stored it.
Studies
- Raft Consensus — Leader Election, Log Replication & SafetySingle leader, append-only log, commit after majority; terms/roles/heartbeats/log matching vs Multi-Paxos; used in etcd/Consul/TiKV/K8s metadata.
- Quorums & Majority — Why 2f+1, Read Quorums & Stale ReadsN=2f+1 tolerates f crashes; majority intersection prevents conflicting commits; linearizable reads need ReadIndex/lease not blind follower reads.
- Leader Election Deep Dive — Timeouts, Randomized Election, Split VotesHeartbeat silence → new-term election via RequestVote; exclusive votes + up-to-date log; randomized timeouts; pre-vote reduces disruption.
- Log Replication & Commit Index — Matching, Conflict Resolution & SafetyAppendEntries + prevLog match; nextIndex backoff; truncate divergent suffixes; commitIndex on majority current-term matchIndex (Figure 8); safety sketch.
- Raft vs Multi-Paxos vs Zab — When to Choose WhatSame CFT RSM goal, different models/ops/ecosystems; prefer Raft/etcd/Consul greenfield; keep ZK when watches own estate; custom Multi-Paxos only with deep expertise.