tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Fiol BonnĂ­n <>
Subject Re: Sticky sessions and load balancing with apache 2
Date Fri, 21 Nov 2003 17:36:01 GMT

Please ensure that you are trying to create a fresh new session when 

I usually test load balancing by doing the following:

On every server:
tail -f 

On a client:
while true; do wget -O /dev/null 
http://apache_server/path/to/context/jsp/or/servlet; done

If you see activity on both logs, load balancing is OK. Never mind 
whether you use sticky sessions or not. You are sure that ALL requests 
are "fresh new" requests, with no session ID.

If you are using a browser, you have to ensure that you clean your 
cookies before each request, which is really embarrassing. Other than 
that, you can disable cookies on your browser, and repeatedly hit 
"reload" after clearing all cookies once.


Antonio Fiol

Drinkwater, GJ (Glen) wrote:

>I can make the apache do load balancing, giving each server 50% of the
>traffic.  When i try to create sticky sessions, it works, but only the first
>tomcat instance gets all the traffic.
>Is it possible to have sticky sessions with load balancing (with tomcat and
>mod_jk2), ie if a user without a session comes in they go to tomcat1,
>then the next instance  etc, but if a user comes in with a session id, it
>goes to the tomcat instance that i was created on???
>To unsubscribe, e-mail:
>For additional commands, e-mail:

View raw message