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.