Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

load-balancing

Sng Wee Jim

2005-03-08

Replies:


Hi,


I am load-balancing tomcat 5.0.28 using JK1.2/AJP1.3.



I noticed the loadbalancer virtual JK worker redirect requests to the tomcat instances in a round-robin fashion, without taking into account which tomcat
has a higher number of active sessions.
For eg.


                         TomcatA        TomcatB
                         ---------------       ---------------
session1 comes in:       1 session
session2                 1 session        1 session
session3                 2 sessions       1 session
session4                 2 sessions       2 sessions


Round-robin, so next session will be handled by TomcatA.




Now if the users log out session 2 and 4,


                   TomcatA        TomcatB
                   ---------------       ---------------
we have:            2 sessions       0 session    



session5 comes:    3 sessions       0 session    





My question is, is it possible for the loadbalancer worker to detect that after session 2 and 4 are invalidated, that tomcatB has lesser number of active sessions and that the next session should be handled by tomcatB?




- 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/

************************************************************************
©2008 junlu.com - Jax Systems, LLC, U.S.A.