zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Camille Fournier <cami...@apache.org>
Subject Re: Multi DC ( DC-1 and DC-2) zookeeper setup
Date Sun, 13 Dec 2015 02:51:20 GMT
2 members cannot form a quorum in a 5 node setup.

You cannot guarantee a quorum split across two data centers will withstand
the loss of either data center. You must have a tiebreaker node in a third
data center.

C
On Dec 12, 2015 9:46 PM, "Kaushal Shriyan" <kaushalshriyan@gmail.com> wrote:

> On Sat, Dec 12, 2015 at 8:07 PM, Flavio Junqueira <
> fpjunqueira@yahoo.com.invalid> wrote:
>
> > Hi Kaushal,
> >
> > See comments below:
> >
> > > On 12 Dec 2015, at 04:07, Kaushal Shriyan <kaushalshriyan@gmail.com>
> > wrote:
> > >
> > > Hi,
> > >
> > > I have couple of questions which are as below :-
> > >
> > > 1) In a 3 node single ensemble, i have 1 leader and 2 followers. when i
> > > explicitly shutdown down the leader for testing purpose, leader
> election
> > > triggers in between the remaining 2 nodes and i see that one of the
> node
> > > becomes a leader and the other is a follower. I am not sure if i
> > completely
> > > understood it. Since there are only 2 nodes how does leader election
> > happen
> > > because we need odd numbers in order to form a quorum. Please correct
> me
> > if
> > > i am understanding it wrong.
> > >
> >
> > You need an odd number of total members in the ensemble. If you have an
> > ensemble of 3, then you can tolerate one crashed server, which means that
> > your quorums have size two. That's why two servers can elect a leader
> among
> > them.
> >
> > In general, if n is the number of servers in the ensemble, then you can
> > tolerate f crashed servers and the relationship between n and f is n =
> 2f +
> > 1.
> >
> > > 2) Is it possible to configure 3 nodes each in DC1 and DC2?
> > > meaning 1 ensemble consists of 6 nodes with 3 nodes in DC-1 and 3 nodes
> > in
> > > DC-2
> > > DC-1 1 Leader 2 Followers
> > > DC-2  1 Follower 2 Observers.
> > >
> > > if DC-1 goes down, will there be a leader election between 3 nodes in
> > DC-2?
> > > Please advise.
> >
> > No, the two observers won't participate in the election, and the
> remaining
> > participant in DC-2 will keep waiting for DC-1 to come back up.
> >
> > This question about tolerating a DC going down using a second DC is a
> > classic one. If we allowed DC-2 to elect a leader in the total absence of
> > processes of DC-1, then we would be prone to split brain scenarios: DC-1
> > suspects DC-2 and vice-versa, but they are both up. If you want
> > availability when a DC going down, you need a third DC. Also, keep in
> mind
> > that availability here refers to both reads and writes. You can set it up
> > to go into read-only mode.
> >
> > -Flavio
> >
> >
> Thanks Flavio for a detailed explanation. Based on the explanation.
>
> If i lets say if i set the below config
>
> DC-1 1 Leader and 2 Followers
> DC-2  2 Followers and 1 observer
>
> Is this a good solution meaning 1 ensemble having 6 nodes. In my earlier
> setup it was *1 Follower and 2 Observers in DC-2*. Now i changed it in DC-2
>  2 Followers and 1 observer. In this case there are 2 Followers which will
> participate in the leader election to form a quorum. Please comment.
>
>
> Regarding "If you want availability when a DC going down, you need a third
> DC. Also, keep in mind that availability here refers to both reads and
> writes. You can set it up to go into read-only mode"
>
> you say set up the below configs for high availability.
>
> DC-1 1 Leader and 2 Followers
> DC-2  2 Followers and 1 observer
> DC-3  2 Followers and 1 observer.
>
> Please advise.
>
> Regards,
>
> Kaushal
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message