Consensus & coordination · Key takeaways
1 min readRapid overview
Key takeaways
- Majorities overlap; 2f + 1 nodes tolerate f failures; use odd cluster sizes.
- Raft: randomised elections per term, majority-replicated log, newer term always wins.
- Use etcd, ZooKeeper or Consul rather than hand-rolling consensus; keep their data small.
- Leases expire while holders pause; fencing tokens checked by the resource are what make locks correct.
- Efficiency locks can be simple; correctness locks need consensus plus fencing.
- Split-brain is prevented by quorum plus fencing, not by timeouts alone.
- Consensus replicates one state; 2PC coordinates different participants.