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

Switch to Threaded View
Zookeeper, mail # user - Clarification regarding maxClientCnxns parameter


Copy link to this message
-
Re: Clarification regarding maxClientCnxns parameter
German Blanco 2013-05-29, 09:46
Hello Richards Peter,
There is no load balancing, however clients may specify a list of servers
in their connection string.
The client library connects to any of the servers in the list and if there
is a failure it will try an alternative server of the list.
I recently posted an explanation to a similar question:
http://mail-archives.apache.org/mod_mbox/zookeeper-user/201305.mbox/browser
The answer didn't apply to that question, but maybe it applies to yours
better.
The restriction is per-server. My guess is that the reason for this is
because these kinds of resources (i.e. socket connections or file
descriptors) are limited per-server, and the best way to control that the
consumption of these resources by the ZooKeeper server doesn't disturb the
rest of the processes is to limit it using the same scope (per-server).
I haven't tested it, but I am quite confident that connections made from
different virtual IP's will be treated as different origin IP, and
connections made from the same virtual IP will be treated as the same
origin IP. As far as I know there will be no way for the ZooKeeper server
to tell if this is a virtual IP or not.
I hope this helps.
Regards,
Germán Blanco.
On Tue, May 28, 2013 at 9:41 AM, Richards Peter <[EMAIL PROTECTED]>wrote:

> Hi,
>
> I am new to zookeeper. I am using twitter's open source CEP project called
> storm. It uses zookeeper to store the state information. It is used
> internally by storm and our project is not using zookeeper to store any
> information. Few days back we had an issue in our setup. We debugged the
> issue and found that we had not increased the value of maxClientCnxns in
> the zoo.cfg file to meet our requirements. When we increased this value
> everything worked fine. I have a query related to the explanation of this
> parameter in
>
> http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#sc_advancedConfiguration
>
> The documentation says that, this is the max number of concurrent client
> connections that can be made from a single IP address to a single member of
> zookeeper ensemble. I would like to know whether clients connect to
> different machines in the ensemble for each connection. I mean is there a
> kind of load balancing taking place when a client tries to make connection
> to zookeeper ensemble. Why is there a restriction on per-zookeeper-server
> basis?
>
> I would also like to know whether virtual IPs are treated as different IPs
> by zookeeper. Will I be able to check this in some log file of zookeeper?
>
> Thanks,
> Richards Peter.
>