|
|
-
Delegating Load within Quorum
Matthew Ward 2012-04-21, 00:25
Hello,
I am running an ensemble of 3 zookeepers (version 3.3.4) which coordinate the activity of many async worker threads. A pattern I am observing is that when we start up the worker threads, they all establish a connection to the first zookeeper listed in the address string. What we would like to happen is for each worker box to round-robin (or randomize) the initial connection to the quorum to better distribute load. The other 2 zookeepers do not get any traffic.
I thought I read someplace that it is preferable to keep the address string the same across the workers...... short of randomizing the quorum order in the address string across the workers - is there a quick and easy way to accomplish this?
Thanks!
-
Re: Delegating Load within Quorum
Jordan Zimmerman 2012-04-21, 01:31
Have a look at the constructor for StaticHostProvider. You'll see that it does a Collections.shuffle(this.serverAddresses) - so each client should connect to a random server in the ensemble.
-JZ
On 4/20/12 5:25 PM, "Matthew Ward" <[EMAIL PROTECTED]> wrote:
>Hello, > >I am running an ensemble of 3 zookeepers (version 3.3.4) which coordinate >the activity of many async worker threads. A pattern I am observing is >that when we start up the worker threads, they all establish a connection >to the first zookeeper listed in the address string. What we would like >to happen is for each worker box to round-robin (or randomize) the >initial connection to the quorum to better distribute load. The other 2 >zookeepers do not get any traffic. > >I thought I read someplace that it is preferable to keep the address >string the same across the workers...... short of randomizing the quorum >order in the address string across the workers - is there a quick and >easy way to accomplish this? > >Thanks! > >
-
Re: Delegating Load within Quorum
Jordan Zimmerman 2012-04-25, 21:56
zkCli.sh seems to use port 8080. Is there any config/argument to change this? I couldn't find one. It's conflicting with another process on the machine.
-JZ
-
Re: Delegating Load within Quorum
Patrick Hunt 2012-04-25, 22:54
On Wed, Apr 25, 2012 at 2:56 PM, Jordan Zimmerman <[EMAIL PROTECTED]> wrote: > zkCli.sh seems to use port 8080. Is there any config/argument to change > this? I couldn't find one. It's conflicting with another process on the > machine.
I don't think this is the case Jordan. I just ran zkCli from 3.4 and no such port was used.
sudo netstat -anp
compare that to jps output?
Patrick
-
Re: Delegating Load within Quorum
Jordan Zimmerman 2012-04-25, 22:57
FYI - here's the exception:
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8080; nested exception is: java.net.BindException: Address already in use On 4/25/12 3:54 PM, "Patrick Hunt" <[EMAIL PROTECTED]> wrote:
>On Wed, Apr 25, 2012 at 2:56 PM, Jordan Zimmerman ><[EMAIL PROTECTED]> wrote: >> zkCli.sh seems to use port 8080. Is there any config/argument to change >> this? I couldn't find one. It's conflicting with another process on the >> machine. > >I don't think this is the case Jordan. I just ran zkCli from 3.4 and >no such port was used. > >sudo netstat -anp > >compare that to jps output? > >Patrick >
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext