Running Apache ZooKeeper (this applies to PAXOS style system just as well) with 2 members - which is not recommended - does not make sense, because if either
- member1 goes down
- member2 goes down
- there's a network partition between member1 and member2
, ZooKeeper will declare business hours to be over, as there's no single sub cluster with a clear majority of members (in this case: > 1). So running ZooKeeper on 2 members makes it less available than running a single member.
Why can't the majority constraint be relaxed so that when the there's a sub cluster of exactly 50% of members, it is considered the active sub cluster if it contains the eldest member? (Eldest as of the just before the partition happened, i.e. when the cluster was member-complete) Who's eldest is information ZooKeeper already keeps track of, so implementation looks easy.
That way, we don't run into the dreaded split-brain scenario, and the ZooKeeper cluster could stay up in 2 of the 3 cases above, improving availability, especially when running 2 members only.
Anything speaking against this?