tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: mod_jk, JSESSION_ID and load-balancing
Date Mon, 24 Jun 2013 17:13:12 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Henri,

This sounds more like a question for the users list. Cross-posting to
re-locate. See more below...

On 6/24/13 11:09 AM, Henri Gomez wrote:
> Hi to all,
> 
> I'm faced a weird problem with a web application who didn't keep
> JSESSIONID generated by Apache Tomcat (via jvmRoute).
> 
> This application is using ASF Shiro who in turn regenerate its own 
> JSESSIONID (and replace one from Tomcat).
> 
> It completly broke mod_jk/ajp load-balancing and sticky session.
> 
> Did some of you allready encountered such problem ?
> 
> 
> For mod_jk, could we imagine to add support for another cookie, ie 
> ROUTE_ID, who will be set by mod_jk and evaluated by its lb worker
> ?
> 
> As temporary fix, I used mod_proxy like this :
> 
> # JkMount /* nexus
> 
> Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ ROUTE}e; path=/"
> env=BALANCER_ROUTE_CHANGED
> 
> <Proxy balancer://nxcluster> BalancerMember
> http://nexus1.mycorp.org:8080 route=nx BalancerMember
> http://nexus2.mycorp.org:8080 route=nx2 ProxySet
> stickysession=ROUTEID </Proxy>
> 
> ProxyPreserveHost On ProxyPass /balancer-manager ! ProxyPass /
> balancer://nxcluster/
> 
> <Location /balancer-manager> SetHandler balancer-manager Order
> Deny,Allow Deny from all Allow from localhost </Location>
> 
> BTW, I'd like to keep jk for this configuration to stay consistent
> with other settings.
> 
> Thanks for feedbacks.

Is is important to retain the original JSESSIONID, or do you only want
to retain the jvmRoute information? I would think you'd want both.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRyH4nAAoJEBzwKT+lPKRY3rUQAKOpPC0GlIiE4jVDut5x5rhm
pS+Lht4WPrKr1F4OSe+8T1yfMci2MPytztCupzWB4TaNK89dylX3xBJJpgnMUd8y
7FDPc0JY/6bp6H2Jd2wXJvhYFgbi/bMYvNu3xZ4QjNRMg4Ccf3/pMEQG+InkufzL
l/ftKOQahztBEiFImFKgxNyVWEgwLKr2k9EKok0yNMikMEe3oGhpeJfSGx36hF84
eQeQFzDpfOQgfcUfSyY982cflQXGPigQawzQLonp9JC47grijB2O2CZVQ/DGwnBv
5QtVTE82YPH2H1t7vn/A8v48Y1ArWA/McgeT426wnNxsU0d8Cp7n4ymqInx3vwAA
wEmsGJA5lBAYAqE5KLNWqIQZPL6uDZoKQG+Guf7vJZjJFirQj3bdNyFn1gyROOa4
t0ahMY9hO3QIS41Nat1KbVabJiL47XW9psr7/WQvIGMkfmu7ZsA9PLcAPBwdkJ/P
Hq3merselvB8BXwgMbtVZvkzp9kCpFR9Y4rSjYyNiirtARMOvl2Gp/psE38fJGqY
KevUctBoUOisAYI7/PVcu/26kJVgtJTa4R2pdnNRI/ztnpB2EO7DKYt6/lt8ghGX
/7Ge0HqyPdaKVBQSu48XXtBbBku8H6PkbaJOxPw40XDGNt6qOtt1L8vHDuPCbL0s
lRYoYFLS9kiLE/Y4sUsb
=Bbx0
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message