-
1. Re: two server cluster - consumer count 2
kpirkl Jun 20, 2007 4:36 PM (in response to kpirkl)I figured this out. My cluster has two nodes 5074 and 15446.
The ClusteredConnectionFactory LoadBalancingFactory is set to the RoundRobinLoadBalancingFactory. The RoundRobinLoadBalancingPolicy walks a list of ConnectionFactoryDelegates which is sequentially ordered. Each stand alone client application gets one connection from the list. This list is ordered the same on both nodes. The result, connection always start on the same node.
Question, is the list of delegates the same order on every node in the cluster if the cluster contained 5 nodes, 10 nodes?
Possible solutions anyone? -
2. Re: two server cluster - consumer count 2
timfox Jun 20, 2007 5:02 PM (in response to kpirkl)You haven't explained why it is a problem for you to have both connections created on the same node.
If you use a connection factory with loadBalancing = true, then it will round robin the creation of the connections on the two nodes.
This gives a good distribution of connections when you have many connections.
I can only assume from your post that you actually want your connections always created on the same node given a specific connection factory??
In which case deploy a cf with supportsLoadBalancing = false;
See the userguide for more details:
http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.3.0.GA/html/configuration.html#conf.connectionfactory.attribuAtes.supportsloadbalancing -
3. Re: two server cluster - consumer count 2
kpirkl Jun 20, 2007 6:44 PM (in response to kpirkl)i can see two possible issues, first if I start 20 standalone clients (each with one connection), they will all create connections to the same node, rather than round robin to multiple nodes, if the node fails, all 20 would try to fail over at the same time.
The second issue has to do with a known problem, http://jira.jboss.com/jira/browse/JBMESSAGING-972. I find, under load, I end up with a non-zero message count on one node with a consumer count of zero on the same node. These messages sit on the queue indefinitely, unless I start a client locally using ConnectionFactory which creates a connection to the same node. -
4. Re: two server cluster - consumer count 2
timfox Jun 21, 2007 7:03 AM (in response to kpirkl)We could very easily make the connection factory randomise the first node it chooses, if you feel this is an issue.
http://jira.jboss.com/jira/browse/JBMESSAGING-1000