This scenario is not possible. An even number of servers doesn't help you as a quorum in ZooKeeper
is (N/2)+1. So, if you put 2 servers in each DC, a network partition would disable BOTH DCs.
(4/2)+1 == 3. So, the only option is to choose one of the DCs as the main DC and put an extra
server there. This way you could lose the "minor" DC.
-Jordan
> On Mar 6, 2017, at 11:34 AM, Le Cyberian <lecyberian@gmail.com> wrote:
>
> Hi Guys,
>
> I would like to have Kafka Cluster which is dependent on Zookeeper like
> many other great projects out their. Kafka would have 4 nodes as its
> cluster since their having even number is not a problem because it does
> leader election based its config it keeps in zookeeper.
>
> My scenario is having two server rooms on different floors having fiber
> connectivity with each other so network latency / lag is almost like a
> local connection.
>
> However, I would like to implement zookeeper cluster between both of them
> for auto-failover / redundancy purposes. So if one server room is down
> other should work properly.
>
> For example: on a 5 node zookeeper cluster distributed on both of the
> server rooms with 3 in one and 2 in other would give me 2 node failure
> tolerance, However if the server room which has 3 servers is down then
> ensemble would be broken and split brain.
>
> Can you please suggest how to achieve this to have failover / redundancy
> between two server rooms or two locations lets say ?
>
> Is it possible to run 3 node cluster in each server room and have some sort
> of master-master between them ?
>
> Thank for your time and helping out in advance.
>
> Kind regards,
>
> Le
|