Load balancing and Sticky sessions
Hello, I have Apache and 2 tomcats running on 2 separate servers which are in a cluster. I am running Tomcat 4.0(using ajp13) via mod_jk. I am also using load balancing.I am losing my session variables when there is a switch between the 2 tomcats. Any help is greatly appreciated. thanks in advance, Kavitha _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Load balancing and Sticky sessions
Hi Kavita, what clustering library are you using. There are several options that we can offer you to do. 1. Try the clustering that is going to ship with Tomcat 4, http://www.filip.net/tomcat-clustering.html 2. Take out Apache out of the equation to make sure your clustering is working clustering. At the end of the page that I mentioned above, there is a Java loadbalancer for testing (do not use this in production :) that you can use to test out session replication. Once you've done that, feel free to send your logs so that we can help you determine the rest of your problems Filip -Original Message- From: Kavitha ranga [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 10:10 AM To: [EMAIL PROTECTED] Subject: Load balancing and Sticky sessions Hello, I have Apache and 2 tomcats running on 2 separate servers which are in a cluster. I am running Tomcat 4.0(using ajp13) via mod_jk. I am also using load balancing.I am losing my session variables when there is a switch between the 2 tomcats. Any help is greatly appreciated. thanks in advance, Kavitha _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Load balancing and Sticky sessions
Unless you have session replication going on between the two Tomcats (or are running Tomcat 5...doubtful since it is in its infant stages), you will always lose your session if you get sent from one Tomcat to another. Ben Ricker On Thu, 2003-03-20 at 12:09, Kavitha ranga wrote: > Hello, >I have Apache and 2 tomcats running on 2 separate servers which are in a > cluster. I am running Tomcat 4.0(using ajp13) via mod_jk. I am also using > load balancing.I am losing my session variables when there is a switch > between the 2 tomcats. Any help is greatly appreciated. > > thanks in advance, > Kavitha > > > > > > _ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Ricker <[EMAIL PROTECTED]> Wellinx.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Load balancing and Sticky sessions
Check your settings in workers.properties # # The loadbalancer (type lb) worker performs weighted round-robin # load balancing with sticky sessions. # Note: # > If a worker dies, the load balancer will check its state #once in a while. Until then all work is redirected to peer #worker. worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=tomcat1,tomcat2 # # END workers.properties # -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 1:18 PM To: Tomcat Users List Subject: Re: Load balancing and Sticky sessions Unless you have session replication going on between the two Tomcats (or are running Tomcat 5...doubtful since it is in its infant stages), you will always lose your session if you get sent from one Tomcat to another. Ben Ricker On Thu, 2003-03-20 at 12:09, Kavitha ranga wrote: > Hello, >I have Apache and 2 tomcats running on 2 separate servers which are in a > cluster. I am running Tomcat 4.0(using ajp13) via mod_jk. I am also using > load balancing.I am losing my session variables when there is a switch > between the 2 tomcats. Any help is greatly appreciated. > > thanks in advance, > Kavitha > > > > > > _ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Ricker <[EMAIL PROTECTED]> Wellinx.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Load balancing and Sticky sessions
Hi Ben, session replication is working for Tomcat 5, and I have back ported a version to tomcat 4.1.x http://www.filip.net/tomcat-clustering.html Filip -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 10:18 AM To: Tomcat Users List Subject: Re: Load balancing and Sticky sessions Unless you have session replication going on between the two Tomcats (or are running Tomcat 5...doubtful since it is in its infant stages), you will always lose your session if you get sent from one Tomcat to another. Ben Ricker On Thu, 2003-03-20 at 12:09, Kavitha ranga wrote: > Hello, >I have Apache and 2 tomcats running on 2 separate servers which are in a > cluster. I am running Tomcat 4.0(using ajp13) via mod_jk. I am also using > load balancing.I am losing my session variables when there is a switch > between the 2 tomcats. Any help is greatly appreciated. > > thanks in advance, > Kavitha > > > > > > _ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Ricker <[EMAIL PROTECTED]> Wellinx.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Load balancing and Sticky sessions
I think I did not make my point clear. I have to rephrase my question. we have Apache 1.3 and 2 tomcats(4.0 ) running on 2 different servers. The 2 servers are on SUN cluster and we have only apache and Oracle as part of the cluster. Tomcat is not in the cluster. So when a switch takes place between the 2 tomcats I am losing my sessions.Also we are on jdk1.3. Any suggesions in highly appreciated. Thanks for the quick response. Kavitha From: Ben Ricker <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> To: Tomcat Users List <[EMAIL PROTECTED]> Subject: Re: Load balancing and Sticky sessions Date: 20 Mar 2003 12:18:09 -0600 Unless you have session replication going on between the two Tomcats (or are running Tomcat 5...doubtful since it is in its infant stages), you will always lose your session if you get sent from one Tomcat to another. Ben Ricker On Thu, 2003-03-20 at 12:09, Kavitha ranga wrote: > Hello, >I have Apache and 2 tomcats running on 2 separate servers which are in a > cluster. I am running Tomcat 4.0(using ajp13) via mod_jk. I am also using > load balancing.I am losing my session variables when there is a switch > between the 2 tomcats. Any help is greatly appreciated. > > thanks in advance, > Kavitha > > > > > > _ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Ricker <[EMAIL PROTECTED]> Wellinx.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Load balancing and Sticky sessions
yes, if you don't cluster your tomcat servers, don't expect session replication to work :-), yes, there are jdk 1.3 version out there, there is one commercial one which you have to pay for. just make a search on google, Filip -Original Message- From: Kavitha ranga [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 10:28 AM To: [EMAIL PROTECTED] Subject: Re: Load balancing and Sticky sessions I think I did not make my point clear. I have to rephrase my question. we have Apache 1.3 and 2 tomcats(4.0 ) running on 2 different servers. The 2 servers are on SUN cluster and we have only apache and Oracle as part of the cluster. Tomcat is not in the cluster. So when a switch takes place between the 2 tomcats I am losing my sessions.Also we are on jdk1.3. Any suggesions in highly appreciated. Thanks for the quick response. Kavitha >From: Ben Ricker <[EMAIL PROTECTED]> >Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> >To: Tomcat Users List <[EMAIL PROTECTED]> >Subject: Re: Load balancing and Sticky sessions >Date: 20 Mar 2003 12:18:09 -0600 > >Unless you have session replication going on between the two Tomcats (or >are running Tomcat 5...doubtful since it is in its infant stages), you >will always lose your session if you get sent from one Tomcat to >another. > >Ben Ricker > > >On Thu, 2003-03-20 at 12:09, Kavitha ranga wrote: > > Hello, > >I have Apache and 2 tomcats running on 2 separate servers which are >in a > > cluster. I am running Tomcat 4.0(using ajp13) via mod_jk. I am also >using > > load balancing.I am losing my session variables when there is a switch > > between the 2 tomcats. Any help is greatly appreciated. > > > > thanks in advance, > > Kavitha > > > > > > > > > > > > _ > > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > > http://join.msn.com/?page=features/junkmail > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] >-- >Ben Ricker <[EMAIL PROTECTED]> >Wellinx.com > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Load balancing and Sticky sessions
That's not true. If mod_jk is setup right all requests for the same session should go to the same tomcat. So you don't need session replication for this. One typical reason that this might not happen is to ommit the jvmRoute="" in the engine element of server.xml. It's also a good idea to have a look at: http://www.ubeans.com/tomcat/ > -Original Message- > From: Ben Ricker [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 20, 2003 7:18 PM > To: Tomcat Users List > Subject: Re: Load balancing and Sticky sessions > > > Unless you have session replication going on between the two > Tomcats (or> are running Tomcat 5...doubtful since it is in its infant stages), you > will always lose your session if you get sent from one Tomcat to > another. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Load Balancing and Sticky Sessions with mod_jk2
I've been playing with this all day. One Apache 2.0.47 machine with jk2 wanting desperately to talk to two tomcat servers. I started this days adventure with mod_jk only to read that sticky sessions wouldn't work with a non --enable-mpm=worker compiled version of apache. (is this true??) I then recompiled apache and mod_jk2 but the configuration syntax is different. in mod_jk land it would something like: worker.tomcat1.port=11009 worker.tomcat1.host=localhost worker.tomcat1.type=ajp13 worker.tomcat1.lbfactor=100 worker.tomcat2.port=12009 worker.tomcat2.host=localhost worker.tomcat2.type=ajp13 worker.tomcat2.lbfactor=100 with the corresponding jvmRoutes and port changes added on the servers. I guess I need an someone who is using different machines for web and tomcat with an example workers2.properties they could email to help me along or some one to answer a question or two. How do I do a worker.type=loadbalance in jk2 syntax? How do I write the correspondiong entries into the workers2.properties file to tell apache about my two tomcat servers and to share the .jsp load between them?. TIA -David Obrien