-
1. Re: Load-Balancing SLSB
joff Jul 5, 2005 8:13 PM (in response to joff)Oops, hit 'submit' instead of 'preview' anyway.. to continue:
the jboss.xml for the SLSB is:<session> <ejb-name>TransactionConductor</ejb-name> <jndi-name>TransactionConductor</jndi-name> <local-jndi-name>TransactionConductorLocal</local-jndi-name> <clustered>True</clustered> <cluster-config> <partition-name>DefaultPartition</partition-name> <home-load-balance-policy> org.jboss.ha.framework.interfaces.RoundRobin </home-load-balance-policy> <bean-load-balance-policy> org.jboss.ha.framework.interfaces.RoundRobin </bean-load-balance-policy> </cluster-config> </session>
The HAJNDI section of my cluster-config.xml is:<mbean code="org.jboss.ha.jndi.HANamingService" name="jboss:service=HAJNDI"> <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends> <attribute name="PartitionName">DefaultPartition</attribute> <!-- <attribute name="BindAddress">${jboss.bind.address}</attribute> --> <attribute name="BindAddress">192.168.225.245</attribute> <attribute name="Port">1100</attribute> <attribute name="Backlog">50</attribute> <depends optional-attribute-name="LookupPool" proxy-type="attribute">jboss.system:service=ThreadPool</depends> <attribute name="DiscoveryDisabled">false</attribute> <attribute name="AutoDiscoveryBindAddress">${jboss.bind.address}</attribute> <attribute name="AutoDiscoveryAddress">230.0.0.4</attribute> <attribute name="AutoDiscoveryGroup">1102</attribute> <attribute name="AutoDiscoveryTTL">16</attribute> <attribute name="RmiPort">0</attribute> </mbean>
As far as I can tell, multicast is working - the DefaultPartition, etc is working with multicast, and I can ping 230.0.0.4 and get responses back from both nodes -
2. Re: Load-Balancing SLSB
ben.wang Jul 7, 2005 5:51 PM (in response to joff)If you still have a problem, can you attach a sample client and jar file to troubleshoot it?
-Ben -
3. Re: Load-Balancing SLSB
joff Jul 11, 2005 12:52 AM (in response to joff)Hi Ben
At the URL below is an EAR containing a minimal test case for my problem. It's basically a servlet for triggering the operation, an MDB to receive the JMS message, which calls a SLSB ten times
Souce is also included
http://joff.googlehax.com/LBTest.zip
PS. You will either need to add a queue/HordeExecuteBatch queue, or change the deployment to use a different queue name. -
4. Re: Load-Balancing SLSB
joff Jul 31, 2005 7:41 PM (in response to joff)*bump*
Is anyone able to help me here? I'm no closer to finding the solution... -
5. Re: Load-Balancing SLSB
joff Sep 6, 2005 6:36 PM (in response to joff)Hi - the next version of my app is about to go into production, but this issue is still unresolved, and it runs jobs that can take up to a couple of hours to run - being able to balance the load of these jobs across my app servers will be a major help..... can anyone shed any light as to why the stateless session beans aren't load balancing?
-
6. Re: Load-Balancing SLSB
joff Sep 6, 2005 8:02 PM (in response to joff)i've also just added in
<configuration-name>Clustered Stateless SessionBean</configuration-name>
for my EJB DDs, but still no joy :-/ -
7. Re: Load-Balancing SLSB
tomdee Oct 21, 2005 5:35 AM (in response to joff)"joff" wrote:
(via a loadbalancing device in front of them)
can't you use the same device to round-robin the request for the ejb client stub for you? especially since your bean is stateless -
8. Re: Load-Balancing SLSB
ben.wang Oct 21, 2005 11:37 AM (in response to joff)Have you tried to test just SLSB clustering first without MDB? Check out the example there.
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossHA
I suspect it is just some setup problem. But if you are really pressed for time for production, you should consider subsribe to JBoss support.
Forum post does not give you guranteed response time (if at all).
-Ben -
9. Re: Load-Balancing SLSB
siofumbar Oct 25, 2005 4:27 AM (in response to joff)You don't make it clear if the MDB is being run on the different nodes in round-robin fashion. Is it? (Have you specified one of the List-based ReceiversImpl implementations that makes round-robin work?)
-
10. Re: Load-Balancing SLSB
joff Oct 25, 2005 3:38 PM (in response to joff)The MDB is run on just one node at a time, using HAJMA/HASingleton
-
11. Re: Load-Balancing SLSB
joff Oct 25, 2005 5:07 PM (in response to joff)"toadie" wrote:
"joff" wrote:
(via a loadbalancing device in front of them)
can't you use the same device to round-robin the request for the ejb client stub for you? especially since your bean is stateless
I'm afraid not, the loadbalancer is only there to handle requests from the outside.. the requests are quite infrequent, but result in a long-running task, which I want to balance the load of, across the JBoss nodes -
12. Re: Load-Balancing SLSB
siofumbar Oct 26, 2005 4:51 AM (in response to joff)OK, I know it is only being run on one node at a time, but what I'm suggesting is that if you change the attribute for ReceiversImpl to use the ReceiversImplLinkedList for the queue or ConnectionManager, you can make each message get handled on a different node, each node in turn.
In my own case, I have an MDB calling an SLSB, and so long as the MDB that handles the message is running on a different node for each message in the queue, the SLSB will run on the same node as that MDB.
The default ReceiversImpl implementation makes all messages get handled on the same machine as the queue untill the load is too high there. See http://jboss.org/index.html?module=bb&op=viewtopic&t=67524. -
13. Re: Load-Balancing SLSB
siofumbar Oct 26, 2005 5:44 AM (in response to joff)Just so we're clear, this round-robin MDB handling is running using HAJMA/HASingleton, so fail-over works too.
-
14. Re: Load-Balancing SLSB
joff Oct 31, 2005 5:41 PM (in response to joff)"ben.wang@jboss.com" wrote:
Have you tried to test just SLSB clustering first without MDB? Check out the example there.
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossHA
I've done this - instead of calling the SLSB from the MDB (in my basic test example I linked to earlier), I'm calling it from the servlet.... round-robining of the SLSB still doesn't work; I'm only creating the remote interface once, and then calling the method on it repeatedly...
Any further ideas as to where I should look?
I suspect it is just some setup problem. But if you are really pressed for time for production, you should consider subsribe to JBoss support.
OT:
I'm trying to push my boss in that direction :)
We've already gone into production, but i'd still like to get this working in time for the next revision :)