Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> QuorumPeer requires at least 2 peers?


Copy link to this message
-
Re: QuorumPeer requires at least 2 peers?
It's not, unfortunately. The reason being that every live quorum must
intersect in at least one node in order to avoid a split-brain problem. So
you can't have a two different quorums consisting of different individual
nodes, because they don't intersect anywhere.

You could arrange it so that just one of your nodes will still function if
all others fail, but you can't do that for every node in your ensemble,
just one.

Henry

On 2 February 2012 16:19, Alan Perez-Rathke <[EMAIL PROTECTED]> wrote:

> Okay thanks.
>
> Just curious, is it currently possible to have replicated ZooKeeper
> servers that will still function if only one of the servers is online?
>
> --
> Alan
>
>
> On Thursday, February 2, 2012 at 6:09 PM, Henry Robinson wrote:
>
> > Yes, that's right. More precisely, a quorum of peers (hence the name ;))
> must participate in an election round for it to terminate.
> >
> > In your case, with a two node cluster, a quorum is usually n/2 + 1
> nodes, which is 2. So both nodes must be available.
> >
> > Henry
> >
> > Sent from my iPad
> >
> > On Feb 2, 2012, at 3:58 PM, Alan Perez-Rathke <[EMAIL PROTECTED](mailto:
> [EMAIL PROTECTED])> wrote:
> >
> > > Hello,
> > >
> > > I am encountering a scenario in which I have started two QuorumPeers
> and then I call shutdown() on one of them (in order to simulate a server
> crashing).
> > >
> > > The remaining QuorumPeer then busy loops within
> Election::lookForLeader(). It never appears to be able to return from this
> loop.
> > >
> > > I have seen this behavior on ZooKeeper versions 3.3.4 and 3.4.2 and
> with election algorithms: LeaderElection, AuthFastLeaderElection, and
> FastLeaderElection.
> > >
> > > Does this mean that QuorumPeer requires at least 2 peers online in
> order to not infinite loop within the internal leader election?
> > >
> > > Thanks,--
> > > Alan
> > >
> >
> >
> >
> >
>
>
>
--
Henry Robinson
Software Engineer
Cloudera
415-994-6679