RE: session load-balancing and clustering of tomcat

2005-03-01 Thread Sng Wee Jim


Hi,

Sorry for the noise. I have found the solution at
   http://marc.theaimsgroup.com/?l=tomcat-user&m=104808785801048&w=2


- Jim

-Original Message-
From: Sng Wee Jim
Sent: Wednesday, March 02, 2005 2:14 PM
To: 'Mladen Turk'; Tomcat Users List
Subject: RE: session load-balancing and clustering of tomcat


Hi,

I am actually trying to get sticky session load-balancing with IIS &
tomcat (not apache webserver, client's requirement).

My worker.properties:
==
worker.list=tomcat1,tomcat2

worker.tomcat1.type=ajp13
worker.tomcat1.host=localhost
worker.tomcat1.port=8009
worker.tomcat1.lbfactor=1
worker.tomcat1.socket_timeout=5
worker.tomcat1.recycle_timeout=10

worker.tomcat2.type=ajp13
worker.tomcat2.host=localhost
worker.tomcat2.port=8209
worker.tomcat2.lbfactor=1
worker.tomcat2.socket_timeout=5
worker.tomcat2.recycle_timeout=10

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1


My uriworkermap.properties:
===
default.worker=tomcat1

/webapp/*.jsp=$(default.worker)
/webapp/*.do=$(default.worker)


"tomcat1" seems to be hardcoded to be the default worker. So how should
I configure, so that tomcat2 will be used for the load-balancing
redirection too?

Also tomcat1 is specified as a load-balancer worker, does that mean that
if tomcat1 goes down, then load-balancing will cease too?


- Jim


-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 02, 2005 12:55 AM
To: Tomcat Users List
Subject: Re: session load-balancing and clustering of tomcat

Lionel Farbos wrote:
> 1) In server.xml :
>
> - uncomment the AJP 1.3 Connector (on port 8009),
> - set the jvmRoute in each Engine
> example : 
>

Session route *must* consists only of alphanumeric characters.
See the:
http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html

Later mod_jk releases will have that as prerequisite so that we
don't need to url encode session routes.


> 2) then add the module mod_jk in apache
> with jk workers defined like this :
>
> worker.list=t1_ajp13,t2_ajp13,loadbalancer
>

This is not quite correct, although it will work.
You should set worker.list only for workers that
have JkMount directive registered.
Also workers that are member of load balancer
*should* not be listed within worker.list

Regards,
Mladen.



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]



RE: session load-balancing and clustering of tomcat

2005-03-01 Thread Sng Wee Jim


Hi,

I am actually trying to get sticky session load-balancing with IIS &
tomcat (not apache webserver, client's requirement).

My worker.properties:
==
worker.list=tomcat1,tomcat2

worker.tomcat1.type=ajp13
worker.tomcat1.host=localhost
worker.tomcat1.port=8009
worker.tomcat1.lbfactor=1
worker.tomcat1.socket_timeout=5
worker.tomcat1.recycle_timeout=10

worker.tomcat2.type=ajp13
worker.tomcat2.host=localhost
worker.tomcat2.port=8209
worker.tomcat2.lbfactor=1
worker.tomcat2.socket_timeout=5
worker.tomcat2.recycle_timeout=10

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1


My uriworkermap.properties:
===
default.worker=tomcat1

/webapp/*.jsp=$(default.worker)
/webapp/*.do=$(default.worker)


"tomcat1" seems to be hardcoded to be the default worker. So how should
I configure, so that tomcat2 will be used for the load-balancing
redirection too?

Also tomcat1 is specified as a load-balancer worker, does that mean that
if tomcat1 goes down, then load-balancing will cease too?


- Jim


-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 02, 2005 12:55 AM
To: Tomcat Users List
Subject: Re: session load-balancing and clustering of tomcat

Lionel Farbos wrote:
> 1) In server.xml :
>
> - uncomment the AJP 1.3 Connector (on port 8009),
> - set the jvmRoute in each Engine
> example : 
>

Session route *must* consists only of alphanumeric characters.
See the:
http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html

Later mod_jk releases will have that as prerequisite so that we
don't need to url encode session routes.


> 2) then add the module mod_jk in apache
> with jk workers defined like this :
>
> worker.list=t1_ajp13,t2_ajp13,loadbalancer
>

This is not quite correct, although it will work.
You should set worker.list only for workers that
have JkMount directive registered.
Also workers that are member of load balancer
*should* not be listed within worker.list

Regards,
Mladen.



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]



Re: session load-balancing and clustering of tomcat

2005-03-01 Thread Lionel Farbos
On Tue, 01 Mar 2005 17:55:15 +0100
Mladen Turk <[EMAIL PROTECTED]> wrote:

> Lionel Farbos wrote:
> > 2) then add the module mod_jk in apache
> > with jk workers defined like this :
> > 
> > worker.list=t1_ajp13,t2_ajp13,loadbalancer
> >
> 
> This is not quite correct, although it will work.
> You should set worker.list only for workers that
> have JkMount directive registered.
> Also workers that are member of load balancer
> *should* not be listed within worker.list
> 
I put this example because it can be useful for maintenance
(the JkMount directive at the instant t is possibly not the same as at the 
instant t+x)

Example :
My webapp "testAppli" is now loadbalanced on hosts h1 and h2.
If want to upgrade my webapp "testAppli".
So,
1) I mono-balance testAppli on h2 (with JkMount /*.jsp h2 + apache reload)
2) I restart testAppli on the Tomcat_h1 instance
3) I mono-balance testAppli on h1 
4) I restart testAppli on the Tomcat_h2 instance
5) I re-loadbalance testAppli

With this principle + mod_jk 1.2.9 (with dynamic change of properties) + a 
graceful restart of Context
I hope upgrading my webapp transparently (without interruptions)...

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



Re: session load-balancing and clustering of tomcat

2005-03-01 Thread Mladen Turk
Lionel Farbos wrote:
1) In server.xml :
- uncomment the AJP 1.3 Connector (on port 8009),
- set the jvmRoute in each Engine
example : 
Session route *must* consists only of alphanumeric characters.
See the:
http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html
Later mod_jk releases will have that as prerequisite so that we
don't need to url encode session routes.

2) then add the module mod_jk in apache
with jk workers defined like this :
worker.list=t1_ajp13,t2_ajp13,loadbalancer
This is not quite correct, although it will work.
You should set worker.list only for workers that
have JkMount directive registered.
Also workers that are member of load balancer
*should* not be listed within worker.list
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: session load-balancing and clustering of tomcat

2005-03-01 Thread Marc Wiatrowski
My gotcha was setting the jvmRoute in EACH/EVERY Engine! 

> -Original Message-
> From: Lionel Farbos [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 01, 2005 8:20 AM
> To: Tomcat Users List
> Cc: [EMAIL PROTECTED]
> 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 :  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 : x.t1_ajp13 or 
> y.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
> > 
> > 
> > 



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



Re: session load-balancing and clustering of tomcat

2005-03-01 Thread Lionel Farbos
1) In server.xml :

- uncomment the AJP 1.3 Connector (on port 8009),
- set the jvmRoute in each Engine
example : 

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 : x.t1_ajp13 or y.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]



session load-balancing and clustering of tomcat

2005-03-01 Thread Sng Wee Jim

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/