tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Wiatrowski" <...@iglass.net>
Subject RE: session load-balancing and clustering of tomcat
Date Tue, 01 Mar 2005 13:48:59 GMT
My gotcha was setting the jvmRoute in EACH/EVERY Engine! 

> -----Original Message-----
> From: Lionel Farbos [mailto:lionel.farbos@free.fr] 
> Sent: Tuesday, March 01, 2005 8:20 AM
> To: Tomcat Users List
> Cc: Wee.Jim.Sng@capco.com
> Subject: Re: session load-balancing and clustering of tomcat
> 
> 1) In server.xml :
> 
> - uncomment the AJP 1.3 Connector (on port 8009),
> - set the jvmRoute in each Engine
> example : <Engine name="Standalone" defaultHost="host1" 
> debug="0" jvmRoute="t1_ajp13">
> 
> 2) then add the module mod_jk in apache
> with jk workers defined like this :
> 
> worker.list=t1_ajp13,t2_ajp13,loadbalancer
> 
> worker.t1_ajp13.type=ajp13
> worker.t1_ajp13.host=host1
> worker.t1_ajp13.port=8009
> worker.t1_ajp13.lbfactor=1
> worker.t1_ajp13.socket_timeout=5
> worker.t1_ajp13.recycle_timeout=10
> 
> worker.t2_ajp13.type=ajp13
> worker.t2_ajp13.host=host2
> worker.t2_ajp13.port=8009
> worker.t2_ajp13.lbfactor=1
> worker.t2_ajp13.socket_timeout=5
> worker.t2_ajp13.recycle_timeout=10
> 
> worker.loadbalancer.type=lb
> worker.loadbalancer.balanced_workers= t1_ajp13,t2_ajp13
> 
> then, you can load-balance your virtual host like this :
> JkMount /*.jsp loadbalancer
> 
> 3) Conclusion :
> Thanks to mod_jk, you'll have load-balancing (with sticky 
> sessions with JSESSION_ID like this : xxxxx.t1_ajp13 or 
> yyyyy.t2_ajp13), and failover.
> 
> This feature work with all tomcats (TC3.3->TC5)
>  
> On Tue, 1 Mar 2005 18:08:59 +0800
> "Sng Wee Jim" <Wee.Jim.Sng@capco.com> wrote:
> 
> > 
> > Hi,
> > 
> > 
> > 
> > I am using tomcat 5.0.28.
> > 
> > 
> > 
> > My question is how to setup sticky-session load-balancing 
> and clustering
> > of tomcat?
> > 
> > 
> > 
> > 
> > 
> > Do I need to upgrade to tomcat 5.5.X? Note the requirement is on
> > sticky-session.
> > 
> > 
> > 
> > - Jim
> > 
> > 
> > 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message