tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: jk load balancing based upon ip address rather than session id
Date Fri, 13 Jun 2008 16:48:25 GMT

Sorry to butt in, but just by curiosity from a Tomcat rookie, do you 
absolutely need to keep handling the same client IP with the same Tomcat 
instance ?

(Do not feel obliged to comment at length, if it would not work, just 
tell me so and I'll get back to my Apache/Tomcat studies.)

My possibly naïve and wrong understanding is as follows :

You have a front-end Apache and access the Tomcats via mod_jk and a load 

You could do the authentication and SSO handling at the Apache level, 
and set some "partial domain" cookie at that level, with some 
cross-domain identifier (as long as the domains have a common part of 
The browser will later send this cookie back with each request addressed 
to any of the servers that match the partial domain.

The user authentication could be passed to Tomcat via mod_jk (I think it 
will do that if you ask nicely).
Separately, the cross-domain cookie will be passed automatically to 
Tomcat in the HTTP request headers, which mod_jk also forwards.

Then at the Tomcat level (whichever instance), you could retrieve this 
cookie and the identifier it contains, and use that as a key to some 
"user session" storage (not in the Tomcat "session object", but e.g. in 
a database common to all Tomcat instances) ?

The separate Tomcats will still each create their separate sessions (and 
JSESSIONID cookies) for this user session, but does it matter ?
And they would be nicely balanced.

No ?

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message