zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srinivasan Veerapandian <srinivasan.veerapand...@ericsson.com>
Subject RE: ZooKeeper ensemble. Size and Impact ?
Date Tue, 14 Jul 2015 04:44:37 GMT
Thanks to all of you guys. I will try it out.

By any chance does anyone know when would the final/stable version of 3.5.0 be available.
Because I can see it's in 3.5.0-alpha.

Thanks,
Srini
-----Original Message-----
From: Rakesh [mailto:rakeshr.apache@gmail.com] 
Sent: Tuesday, July 14, 2015 10:12 AM
To: user@zookeeper.apache.org; Srinivasan Veerapandian
Cc: Alexander Shraer
Subject: Re: ZooKeeper ensemble. Size and Impact ?

Thank you Alex for the info.

Hi Srini, I think Observer would be fine for your case. Probably you can try it out.

-Rakesh

On 13 Jul 2015 21:41, Alexander Shraer <shralex@gmail.com> wrote:
>
> In 3.4 releases you can't connect an observer to a standalone 
> zookeeper server, but in 3.5.0 if you set standaloneEnabled=false your 
> server will run in a "distributed"
> mode even if its the only one and
> you'll be able to have observers or reconfigure adding more servers 
> later if needed.
>
> On Mon, Jul 13, 2015 at 5:34 AM, Rakesh R <rakeshr@huawei.com> wrote: 
>
> > 
> > >>>>> Is it so that only ensemble would be down but other functions

> > >>>>> would
> > be up and running like data-sync ... ? 
> > Say, if a ZooKeeper server lost connection with the quorum. It will 
> > shutdown all the services and try to join the quorum by starting 
> > internal election algo. There is a special type of "read-only" 
> > server, on connection lost, it will automatically transition to r-o 
> > mode and serve only the requests from r-o client. Please visit 
> > http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html for more 
> > details about r-o feature.
> > 
> > >>>>> My need to run only 2 ZKS as I'm ok with have +1 copy of the
data. 
> > Is there a way to run a dummy ZKS in any of the instance ? 
> > There is a typical 'Observer' server mode which will act as an 
> > observer and only syncup data with the Leader server, but I'm not 
> > really sure whether it will work along with Standalone server. I 
> > haven't tried yet, probably you can do a try 
> > http://zookeeper.apache.org/doc/r3.5.0-alpha/zookeeperObservers.html
> > 
> > To begin with, you can run both as Participant and later if you want 
> > to change servers you can use reconfig feature, 
> > http://zookeeper.apache.org/doc/trunk/zookeeperReconfig.html
> > In 1+1 deployment, tolerated failure is 0 and you should ensure both 
> > servers are up & running for the availability of ZooKeeper service. 
> > I could see one advantage of this approach is, you have a backup 'dataDir'.
> > Administrator can use this if one is lost. 
> > 
> > 
> > -Rakesh
> > -----Original Message-----
> > From: Srinivasan Veerapandian 
> > [mailto:srinivasan.veerapandian@ericsson.com
> > ]
> > Sent: 13 July 2015 15:01
> > To: user@zookeeper.apache.org
> > Subject: RE: ZooKeeper ensemble. Size and Impact ? 
> > 
> > Rakesh & Garry,
> > 
> > 
> > 
> > Thanks for the information and details.  From both of your responses 
> > I can see that, more failures will cause drop of quorum automatically.
> > 
> > Is it so that only ensemble would be down but other functions would 
> > be up and running like data-sync ... ? Sorry If this is very basic question.
> > 
> > 
> > 
> > I see a note below note, does this means we can form ensemble with 
> > leaderServes turned ON.
> > 
> > Turning on leader selection is highly recommended when you have more 
> > than three ZooKeeper servers in an ensemble.
> > http://zookeeper.apache.org/doc/r3.3.2/zookeeperAdmin.html
> > 
> > My need to run only 2 ZKS as I'm ok with have +1 copy of the data. 
> > Is there a way to run a dummy ZKS in any of the instance ?
> > 
> > 
> > 
> > Thanks,
> > 
> > Srini
> > 
> > -----Original Message-----
> > From: Rakesh R [mailto:rakeshr@huawei.com]
> > Sent: Monday, July 13, 2015 1:43 PM
> > To: user@zookeeper.apache.org; Srinivasan Veerapandian
> > Subject: RE: ZooKeeper ensemble. Size and Impact ? 
> > 
> > 
> > 
> > Hi Srini,
> > 
> > 
> > 
> > ZooKeeper service will be available if 'quorum' number of servers 
> > are running(simple majority voting factors).
> > 
> > 
> > 
> > I could see, one of the reason to get a majority vote is to avoid 
> > "split-brain" problem. In a network failure we don't want the two 
> > parts of the system to continue as usual. We need only one part to 
> > continue and the other to understand that it is out of the cluster and keep quiet.
> > 
> > 
> > 
> > The main reason for suggesting odd number is, with even there won't 
> > get much benefit to the tolerated failures in terms of majority. 
> > With 3 and 4 servers, we could see the majority is 2 and 3. But in 
> > both the cases, the tolerated number of failure is 1.
> > 
> > 
> > 
> > Quorum = Leader + Followers,
> > 
> > (2n+1) nodes can tolerate failure of 'n' nodes. 
> > 
> > 
> > 
> > For example,
> > 
> > n=0, (2*0+1) -> 1 server = standalone. Here there is no quorum majority. 
> > 
> >              -> 2 servers = majority is 2. So it needs min 2 servers

> >to  form quorum. Tolerated failure is 0, if >0 failure will drop 
> >quorum  automatically.
> > 
> > 
> > 
> > n=1, (2*1+1) -> 3 servers = majority is 2. So it needs min 2 servers 
> > to form quorum. Tolerated failure is 1, if >1 failures will drop 
> > quorum automatically.
> > 
> >              -> 4 servers = majority is 3. So it needs min 3 servers

> >to  form quorum. Tolerated failure is 1, if >1 failures will drop 
> >quorum  automatically.
> > 
> > 
> > 
> > n=2, (2*2+1) -> 5 servers = majority is 3. So it needs min 3 servers 
> > to form quorum. Tolerated failure is 2, if >2 failures will drop 
> > quorum automatically.
> > 
> >              -> 6 servers = majority is 4. So it needs min 4 servers

> >to  form quorum. Tolerated failure is 2, if >2 failures will drop 
> >quorum  automatically.
> > 
> > 
> > 
> > n=3, (2*3+1) -> 7 servers = majority is 4. So it needs min 4 servers 
> > to form quorum. Tolerated failure is 3, if >3 failures will drop 
> > quorum automatically.
> > 
> >              -> 8 servers = majority is 5. So it needs min 5 servers

> >to  form quorum. Tolerated failure is 3, if >3 failures will drop 
> >quorum  automatically.
> > 
> > 
> > 
> > 
> > 
> > -Rakesh
> > 
> > 
> > 
> > -----Original Message-----
> > 
> > From: Srinivasan Veerapandian 
> > [mailto:srinivasan.veerapandian@ericsson.com
> > ]
> > 
> > Sent: 13 July 2015 11:48
> > 
> > To: user@zookeeper.apache.org<mailto:user@zookeeper.apache.org>
> > 
> > Subject: ZooKeeper ensemble. Size and Impact ? 
> > 
> > 
> > 
> > Hi,
> > 
> > 
> > 
> > We know ZK demands odd number of servers to provide reliability. 
> > 
> > My requirement on having zookeeper in my application is to "know the 
> > application status" from all the clients(Max 100).
> > 
> > And today my application can support deployment 1+1(=2) to N+1(=100) 
> > Given this I would like to go with 2 ZK servers in two different 
> > instances because adding one more server for this purpose would be 
> > demand one more instance itself in my 1+1 deployment model.
> > 
> > 
> > 
> > Questions: 
> > 
> > 
> > 
> > 
> > 
> > 1.       What would happen to ensemble formed ? Would the service 
> > goes down automatically ?
> > 
> > 
> > 
> > 2.       What would be the impact if number ZK server instances are 
> > even (E.g. 2)
> > 
> > 
> > 
> > How do I size a Zoo Keeper ensemble (cluster)? 
> > 
> > https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ
> > 
> > 
> > 
> > Designing a Zoo Keeper Deployment
> > 
> > http://zookeeper.apache.org/doc/r3.1.2/zookeeperAdmin.html
> > 
> > 
> > 
> > 
> > 
> > Thanks,
> > 
> > Srini
> > 
> > 
> > 
Mime
View raw message