Control plane
Raft and quorum
23 / 82

Use an odd number of etcd members: a fourth node adds cost, not safety.

etcd uses the Raft algorithm. One leader accepts writes and replicates them; a write is committed only when a majority has stored it.

Members needed to commit a write (quorum) and failures tolerated3 members: quorum 2, tolerates 1 failure4 members: quorum 3, STILL tolerates only 1wasteful5 members: quorum 3, tolerates 2 failures7 members: quorum 4, tolerates 3 (rarely worth the latency)Formula: quorum = floor(n/2) + 1
Leaderaccepts all writesFollower 1replicates logFollower 2replicates logwrite appended, then acknowledged2 of 3 acknowledged: the entry is COMMITTED

If the leader disappears, followers wait a randomised timeout and the first becomes a candidate. During the election, usually well under a second, no writes are accepted.