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" <[EMAIL PROTECTED]> 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
> 
> 
> 
> 
> 
> 
> ************************************************************************
> The information in this email is confidential and is intended solely
> for the addressee(s).
> Access to this email by anyone else is unauthorized. If you are not
> an intended recipient, please notify the sender of this email
> immediately. You should not copy, use or disseminate the
> information contained in the email.
> Any views expressed in this message are those of the individual
> sender, except where the sender specifically states them to be
> the views of Capco.
> 
> http://www.capco.com/
> 
> ************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to