Middle+
How many nodes are needed for etcd fault tolerance and why?
sobes.tech AI
Answer from AI
For high availability, it is recommended to use an odd number of etcd nodes, usually at least 3. This is related to the Raft consensus algorithm, which requires a majority (quorum) to make decisions.
Why exactly 3:
- With 3 nodes, the quorum is 2 nodes.
- You can lose 1 node and the system will continue to operate.
Using 2 nodes, losing one will lead to a lack of quorum and stop operation.
For larger clusters, 5 or 7 nodes are usually chosen to ensure a balance between high availability and performance.
In summary:
- Minimum of 3 nodes for high availability.
- The number of nodes should be odd for proper quorum operation.