-
1. Re: Problem with Connection Load Balancing
vpothnis Nov 24, 2009 4:30 PM (in response to vpothnis)I am using JConsole to check/verify that the connections have been established in a load balanced way to all the 3 HornetQ servers.
-
2. Re: Problem with Connection Load Balancing
vpothnis Nov 26, 2009 4:12 PM (in response to vpothnis)Update:
I noticed that when i am debugging through the loop that creates multiple connections, the connections were load balanced.
So, when I introduced a Thread.sleep(1000) in the loop where I was creating the connections, the connections were load balanced across the hornetQ servers in the cluster.
Has anybody noticed this? Any inputs on this? -
3. Re: Problem with Connection Load Balancing
timfox Nov 26, 2009 4:23 PM (in response to vpothnis)Probably you haven't waited long enough for discovery information to reach the client.
Each server broadcasts its whereabouts every x milliseconds, when the client gets a broadcast from a server it will know about that server.
Until it gets a broadcast from a server it won't know it exists.
The broadcast period is configurable in the broad cast group config (broadcast-period).
Also there is a discovery-initial-wait setting on the session factory.
See user manual for more info. -
4. Re: Problem with Connection Load Balancing
vpothnis Nov 26, 2009 7:49 PM (in response to vpothnis)Oh! That might explain this. Thanks Tim.
I will look into the "discovery-initial-wait" and the broadcast group configuration.
Thanks
Vinay -
5. Re: Problem with Connection Load Balancing
vpothnis Nov 27, 2009 7:07 PM (in response to vpothnis)I think this is related to the defect in RoundRobin implementation.
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=164343
I tested with a local fix on RoundRobinConnectionLoadBalancingPolicy.java and the load balancing worked correctly.