You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Sznajder ForMailingList <bs...@gmail.com> on 2013/09/12 12:31:14 UTC

Starting a distributed env of ZK

Hi

Two questions:

1 - In case of  distributed env of ZK, should I start ZK on each one of the
servers? Or only in the master?

2 - Is it OK to start the server via "bin/zkServer.sh start " or should I
use the long command line:
java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/
slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \
org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg



Thanks!

Re: Starting a distributed env of ZK

Posted by Sznajder ForMailingList <bs...@gmail.com>.
Thanks a lot!

Short and long answers definitely answer my interrogations!

Benjamin


On Thu, Sep 12, 2013 at 3:56 PM, Chris Brinley <
Chris.Brinley@morningstar.com> wrote:

> Short answer: start them all. Use the shell script.
>
> Longer answer: If I understand the question I think your asking whether
> the "master" handles startup of the other nodes or needs to be started
> first. No to both cases. Master is elected in distributed system. All
> servers are independent from an operations point of view. Netflix has
> Exhibitor which is a zookeeper manager and might be what your after.
> Apologies if I've misunderstood and your after something else.
> https://github.com/Netflix/exhibitor/wiki
>
>
>
> On 9/12/13 6:56 AM, "Sznajder ForMailingList" <bs...@gmail.com>
> wrote:
>
> >Hi
> >
> >Thank you for your answer.
> >Indeed, I would like to use a quorum of instances.
> >
> >In this case:
> >
> >1 - should I start ZK on each one of the servers?
> >
> >2 - Starting ZK is done via zkServer.sh or via the command line
> >java -cp zookeeper.jar:lib/slf4j-api-1.
> >6.1.jar:lib/
> >slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \
> >org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
> >
> >
> >Thanks again!
> >
> >
> >
> >On Thu, Sep 12, 2013 at 2:40 PM, Rakesh R <ra...@huawei.com> wrote:
> >
> >> Hi Sznajder,
> >>
> >> >> 1 - In case of  distributed env of ZK, should I start ZK on each one
> >>of
> >> the servers? Or only in the master?
> >>
> >> It all depends on the tolerated failures in the system and if ZK server
> >> goes down, what would be the impact on your application. In case of
> >>Single
> >> node ZooKeeper server, it will be the Single Point of Contact.
> >>
> >> The advantage of having ZooKeeper quorum of instances is, your system
> >>will
> >> be able to run even if few ZooKeeper server fails.
> >>
> >> Please see more about ZooKeeper quorum at:
> >>
> >>
> >>
> >>
> http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_RunningRep
> >>licatedZooKeeper
> >>
> >>
> >>
> >> >>>>>2 - Is it OK to start the server via "bin/zkServer.sh start " or
> >> should I use the long command line:
> >> java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/
> >> slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \
> >> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
> >>
> >> I'll suggest to use the script bin/zkServer.sh start and this is pretty
> >> simple.
> >>
> >> Please see this section, it will be helpful to setup single node.
> >>
> >>
> >>
> >>
> http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_Installing
> >>SingleMode
> >>
> >> -Rakesh
> >>
> >> -----Original Message-----
> >> From: Sznajder ForMailingList [mailto:bs4mailinglist@gmail.com]
> >> Sent: 12 September 2013 16:01
> >> To: user@zookeeper.apache.org
> >> Subject: Starting a distributed env of ZK
> >>
> >> Hi
> >>
> >> Two questions:
> >>
> >> 1 - In case of  distributed env of ZK, should I start ZK on each one of
> >> the servers? Or only in the master?
> >>
> >> 2 - Is it OK to start the server via "bin/zkServer.sh start " or should
> >>I
> >> use the long command line:
> >> java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/
> >> slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \
> >> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
> >>
> >>
> >>
> >> Thanks!
> >>
>
>

Re: Starting a distributed env of ZK

Posted by Chris Brinley <Ch...@morningstar.com>.
Short answer: start them all. Use the shell script.

Longer answer: If I understand the question I think your asking whether
the "master" handles startup of the other nodes or needs to be started
first. No to both cases. Master is elected in distributed system. All
servers are independent from an operations point of view. Netflix has
Exhibitor which is a zookeeper manager and might be what your after.
Apologies if I've misunderstood and your after something else.
https://github.com/Netflix/exhibitor/wiki



On 9/12/13 6:56 AM, "Sznajder ForMailingList" <bs...@gmail.com>
wrote:

>Hi
>
>Thank you for your answer.
>Indeed, I would like to use a quorum of instances.
>
>In this case:
>
>1 - should I start ZK on each one of the servers?
>
>2 - Starting ZK is done via zkServer.sh or via the command line
>java -cp zookeeper.jar:lib/slf4j-api-1.
>6.1.jar:lib/
>slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \
>org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
>
>
>Thanks again!
>
>
>
>On Thu, Sep 12, 2013 at 2:40 PM, Rakesh R <ra...@huawei.com> wrote:
>
>> Hi Sznajder,
>>
>> >> 1 - In case of  distributed env of ZK, should I start ZK on each one
>>of
>> the servers? Or only in the master?
>>
>> It all depends on the tolerated failures in the system and if ZK server
>> goes down, what would be the impact on your application. In case of
>>Single
>> node ZooKeeper server, it will be the Single Point of Contact.
>>
>> The advantage of having ZooKeeper quorum of instances is, your system
>>will
>> be able to run even if few ZooKeeper server fails.
>>
>> Please see more about ZooKeeper quorum at:
>>
>>
>> 
>>http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_RunningRep
>>licatedZooKeeper
>>
>>
>>
>> >>>>>2 - Is it OK to start the server via "bin/zkServer.sh start " or
>> should I use the long command line:
>> java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/
>> slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \
>> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
>>
>> I'll suggest to use the script bin/zkServer.sh start and this is pretty
>> simple.
>>
>> Please see this section, it will be helpful to setup single node.
>>
>>
>> 
>>http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_Installing
>>SingleMode
>>
>> -Rakesh
>>
>> -----Original Message-----
>> From: Sznajder ForMailingList [mailto:bs4mailinglist@gmail.com]
>> Sent: 12 September 2013 16:01
>> To: user@zookeeper.apache.org
>> Subject: Starting a distributed env of ZK
>>
>> Hi
>>
>> Two questions:
>>
>> 1 - In case of  distributed env of ZK, should I start ZK on each one of
>> the servers? Or only in the master?
>>
>> 2 - Is it OK to start the server via "bin/zkServer.sh start " or should
>>I
>> use the long command line:
>> java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/
>> slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \
>> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
>>
>>
>>
>> Thanks!
>>


Re: Starting a distributed env of ZK

Posted by Sznajder ForMailingList <bs...@gmail.com>.
Hi

Thank you for your answer.
Indeed, I would like to use a quorum of instances.

In this case:

1 - should I start ZK on each one of the servers?

2 - Starting ZK is done via zkServer.sh or via the command line
java -cp zookeeper.jar:lib/slf4j-api-1.
6.1.jar:lib/
slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \
org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg


Thanks again!



On Thu, Sep 12, 2013 at 2:40 PM, Rakesh R <ra...@huawei.com> wrote:

> Hi Sznajder,
>
> >> 1 - In case of  distributed env of ZK, should I start ZK on each one of
> the servers? Or only in the master?
>
> It all depends on the tolerated failures in the system and if ZK server
> goes down, what would be the impact on your application. In case of Single
> node ZooKeeper server, it will be the Single Point of Contact.
>
> The advantage of having ZooKeeper quorum of instances is, your system will
> be able to run even if few ZooKeeper server fails.
>
> Please see more about ZooKeeper quorum at:
>
>
> http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_RunningReplicatedZooKeeper
>
>
>
> >>>>>2 - Is it OK to start the server via "bin/zkServer.sh start " or
> should I use the long command line:
> java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/
> slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \
> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
>
> I'll suggest to use the script bin/zkServer.sh start and this is pretty
> simple.
>
> Please see this section, it will be helpful to setup single node.
>
>
> http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_InstallingSingleMode
>
> -Rakesh
>
> -----Original Message-----
> From: Sznajder ForMailingList [mailto:bs4mailinglist@gmail.com]
> Sent: 12 September 2013 16:01
> To: user@zookeeper.apache.org
> Subject: Starting a distributed env of ZK
>
> Hi
>
> Two questions:
>
> 1 - In case of  distributed env of ZK, should I start ZK on each one of
> the servers? Or only in the master?
>
> 2 - Is it OK to start the server via "bin/zkServer.sh start " or should I
> use the long command line:
> java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/
> slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \
> org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
>
>
>
> Thanks!
>

RE: Starting a distributed env of ZK

Posted by Rakesh R <ra...@huawei.com>.
Hi Sznajder,

>> 1 - In case of  distributed env of ZK, should I start ZK on each one of the servers? Or only in the master?

It all depends on the tolerated failures in the system and if ZK server goes down, what would be the impact on your application. In case of Single node ZooKeeper server, it will be the Single Point of Contact.

The advantage of having ZooKeeper quorum of instances is, your system will be able to run even if few ZooKeeper server fails.

Please see more about ZooKeeper quorum at:

http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_RunningReplicatedZooKeeper



>>>>>2 - Is it OK to start the server via "bin/zkServer.sh start " or should I use the long command line:
java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/
slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \ org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg

I'll suggest to use the script bin/zkServer.sh start and this is pretty simple.

Please see this section, it will be helpful to setup single node.

http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_InstallingSingleMode

-Rakesh

-----Original Message-----
From: Sznajder ForMailingList [mailto:bs4mailinglist@gmail.com] 
Sent: 12 September 2013 16:01
To: user@zookeeper.apache.org
Subject: Starting a distributed env of ZK

Hi

Two questions:

1 - In case of  distributed env of ZK, should I start ZK on each one of the servers? Or only in the master?

2 - Is it OK to start the server via "bin/zkServer.sh start " or should I use the long command line:
java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/
slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \ org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg



Thanks!