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

Switch to Threaded View
Zookeeper >> mail # user >> very uneven distribution of clients to servers...

Copy link to this message
Re: very uneven distribution of clients to servers...
Kishore has a good idea to investigate.

If you're using the Java ZooKeeper client, you can see in the code that the
way connections are established is that we parse the server list, resolve
them to inet addresses, and call Collections.shuffle on the list of server
addresses. It's possible that Collections.shuffle is not random enough but
I suspect that there's something else happening.
If you're not using the Java client, I can't comment, might be worth
glancing at the source code for your client library to make sure it looks
sane and there's not a bug.
On Wed, Dec 5, 2012 at 5:01 PM, kishore g <[EMAIL PROTECTED]> wrote:

> Did all the clients connect after all the 3 nodes were up and running ? One
> reason why you find this uneven distribution is when you restart one of the
> zookeeper nodes all the clients reconnect to one of the remaining nodes but
> then dont reconnect back to original node when it come back up.
> Can you confirm this is not the case?
> On Wed, Dec 5, 2012 at 12:27 PM, Brian Tarbox <[EMAIL PROTECTED]>
> wrote:
> > I have a three node cluster and am getting a very uneven distribution of
> > client connections to the servers.
> >
> > The middle server in the connection string list seems to get a tiny slice
> > of the clients. I understand its "random" and so I don't expect perfect
> > distribution but I'm seeing very consistent numbers like:
> > 12 : 3 : 14 for the connection counts.
> >
> > I run the zkTop script (excellent!) and so I can see the connection
> counts
> > and I've _never_ seen the middle server get more than a few connections.
> >
> > If I reorder the server addresses in the connection string its always the
> > middle server that gets short changed.
> >
> > Any suggestions / insights?
> >
> > Running 3.4.5.
> >
> > Thanks.
> >
> > --
> > http://about.me/BrianTarbox
> >