-
1. Re: Loadbalancing & clustering
brian.stansberry Aug 19, 2006 11:16 AM (in response to fayaz)Depends upon what you want to load balance and what you mean by "clustering".
If all you want to do is load balance webapp requests between a bunch of servers, and you don't need to replicate HTTP session state (i.e. you don't care if the user's session is lost if they fail over from one server to another), then you don't need to use any of JBoss AS's clustering features -- you can just run the default config.
Otherwise, you need the AS clustering features. -
2. Re: Loadbalancing & clustering
fayaz Aug 19, 2006 3:39 PM (in response to fayaz)Thanks for your reply, i am trying to implement just load balancing, no clustering required, as you described, but i am having some problems, i have used the default setup,
i have copied the loadbalancer.sar directory to the deploy directory on a default setup of jboss, and changed the entries in the jboss-service.xml as below, and i get the new entry for loadbalancer in the jmx-console, there is a statistics attribute , and the requests always stay at zero for both nodes when i browse to this url from the server.
https://localhost:8443
whats going wrong!!, what is the best way to see if it is working?
<!-- The URL to use to connect the host. URLs like http://www.xx.yy:8080/ are also allowed -->
<host-url>https://localhost:8443/</host-url>
<!-- The loadbalancer-factor -->
<lb-factor>1</lb-factor>
<host-url>https://server2:8443/</host-url>
<lb-factor>2</lb-factor> -
3. Re: Loadbalancing & clustering
fayaz Aug 19, 2006 3:41 PM (in response to fayaz)here is the xml again, as it didn't all show in the last post
<!-- The URL to use to connect the host. URLs like http://www.xx.yy:8080/ are also allowed -->
<host-url>https://localhost:8443/</host-url>
<!-- The loadbalancer-factor -->
<lb-factor>1</lb-factor>
<host-url>https://frtsspst:8443/</host-url>
<lb-factor>2</lb-factor> -
4. Re: Loadbalancing & clustering
brian.stansberry Aug 19, 2006 6:13 PM (in response to fayaz)Sorry, I can't help you much with the loadbalancer.sar from the varia module; haven't dealt with it and it was removed from 4.0.4. Suggest you try using Apache and mod_jk as your load balancer. See http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss
-
5. Re: Loadbalancing & clustering
fayaz Aug 20, 2006 5:18 AM (in response to fayaz)ok thanks,
I have been looking at the documentation, but am a bit stuck on this bit......i have downloaded the .zip package, as i am using a windows platform, and the instructions below say..... rename the lib mod_jk.so , but doesn't say what to rename it to, also, it is not in the zip package.
Step #2: Download mod_jk 1.2.x
Download the latest package available from Tomcats's 'Download Tomcat connector section' page . Always download the latest stable release if possible (currently 1.2.18).
Rename the lib mod_jk.so and drop it in APACHE_HOME/modules directory.
NOTE: Don't use any release prior to mod_jk 1.2.15. Earlier releases are fairly buggy. -
6. Re: Loadbalancing & clustering
brian.stansberry Aug 20, 2006 3:02 PM (in response to fayaz)I'm guessing that when you went to the download page you followed a link for a source release rather than a binary. If you follow the trail for a binary release you'll get to a page that has links for things like "mod_jk-apache-2.0.58.so" and "mod_jk-apache-2.2.2.so". That's what you download, and whatever you download you rename *to* just "mod_jk.so".
-
7. Re: Loadbalancing & clustering
fayaz Aug 21, 2006 7:55 AM (in response to fayaz)HI, Thanks,
I have managed to load balance the jboss servers with this method, but, each of the jboss servers are hosted with tomcat, using a ssl session,
how do i send the requests to a https request, as when i change the 8009 to 8443, it doesn't work. -
8. Re: Loadbalancing & clustering
brian.stansberry Aug 21, 2006 1:18 PM (in response to fayaz)Do you need SSL functionality at the JBoss/Tomcat layer, i.e. can Apache handle the SSL for you via mod_ssl?
If you do need it at the Tomcat layer (for example, to do CLIENT-CERT authentication), here is a link to some old docs that I found; may no longer be useful:
http://tomcat.apache.org/tomcat-3.3-doc/tomcat-ssl-howto.html -
9. Re: Loadbalancing & clustering
fayaz Aug 22, 2006 8:03 AM (in response to fayaz)Hi Thanks for your help, we have now taken apache load balancing, and pointed it to the 2 jboss/tomcat servers, but we are loosing the session, when we login to the jboss hosted application, it times out the session, (but not when we do it without the balancing), i have set the entry in the server.xml for the engine name ie jvmroute="node1", but we are still getting a timeout problem
do you have any suggetions?
thanks -
10. Re: Loadbalancing & clustering
brian.stansberry Aug 22, 2006 12:51 PM (in response to fayaz)Make sure you have attribute "useJK" set to true in jbossweb-tomcat55.sar/META-INF/jboss-service.xml.
If you are using container managed FORM authentication, http://jira.jboss.com/jira/browse/JBAS-1900
will also affect you, as after failover the failover node will require a new login. Workaround there is to use ClusteredSingleSignOn (see http://wiki.jboss.org/wiki/Wiki.jsp?page=SingleSignOn )