4 ms·
You need an odd number of max nodes, not an odd number of live nodes. Raft nodes require knowing they are in the majority to be healthy, if you have a network
by toolz 5y ago
You need an odd number of max nodes, not an odd number of live nodes. Raft nodes require knowing they are in the majority to be healthy, if you have a network partition and half are on each side you get split brain because neither side can know for sure which side should be considered authoritative/healthy.
- NavinF 5y agoI think what he meant to ask is “Are 4 nodes less reliable than 3?” and I’m pretty sure the answer is “no” despite the other comment implying otherwise. AFAIK, even nodes can hurt latency, but not reliability.
- tick_tock_tick 5y ago“Are 4 nodes less reliable than 3?” The answer is 3 is no less reliable then 4.
- eklavya 5y agoIt depends on the network topology (likelihood not theoretical) but with the amount of split brains I have witnessed, I would say definitely yes, 4 is less reliable than 3.
- mirekrusin 5y agoCounter-intuitively 4 nodes are less reliable than 3 nodes for majority vote systems. Both can tolerate single failed node. However probability of 2nd node failure is 50% higher for 4 node setup than for 3 node setup. That's because 2nd node failure probablity for 4 node system is P(a) + P(b) + P(c) = 3P and for 3 node system is P(a) + P(b) = 2P; it's 3P vs 2P probablity. It's more than 50% overall because similar probability happens for first node failure - it's more likely that one out of 4 nodes will fail than one out of 3. In other words you have to guarantee one more node running without any reliability gains and that guarantee costs reliability.
- Kinrany 5y agoGah, I meant even, not odd! That is, if having an even number of nodes causes problems, you'll have problems every time one of your odd number of nodes goes down!