You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Kent Närling <ke...@seamless.se> on 2011/11/25 15:28:27 UTC

Having a primary server in the connect string?

In the Zookeeper constructor javadoc it says:
"The instantiated ZooKeeper client object will pick an arbitrary
server from the connectString and attempt to connect to it."

Is there any way of having multiple servers but having one acting as a
primary server which it will prefer?

We are planning to deploy a cluster where we want to have identical
nodes  (ie all services on all nodes), so in that case it naturally
seems preferrable that the client connects to the local zookeeper node
primarily...

//Kent

Re: Having a primary server in the connect string?

Posted by Віталій Тимчишин <ti...@gmail.com>.
2011/11/26 Kapil Thangavelu <ka...@gmail.com>

> its unclear what scenario would allow for the local
> zk to fail but still allow connectivity to other servers.. ymmv
>
>
Rolling restart?


-- 
Best regards,
 Vitalii Tymchyshyn

Re: Having a primary server in the connect string?

Posted by Kapil Thangavelu <ka...@gmail.com>.
you can instruct the client to use deterministic order among the
passed in servers, the original intent was for testing, for real world
scenarios you'd want to scramble the non localhost nodes to avoid a
unbalanced load. its unclear what scenario would allow for the local
zk to fail but still allow connectivity to other servers.. ymmv

hth,
kapil


On Fri, Nov 25, 2011 at 9:28 AM, Kent Närling <ke...@seamless.se> wrote:
> In the Zookeeper constructor javadoc it says:
> "The instantiated ZooKeeper client object will pick an arbitrary
> server from the connectString and attempt to connect to it."
>
> Is there any way of having multiple servers but having one acting as a
> primary server which it will prefer?
>
> We are planning to deploy a cluster where we want to have identical
> nodes  (ie all services on all nodes), so in that case it naturally
> seems preferrable that the client connects to the local zookeeper node
> primarily...
>
> //Kent
>