tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Gomez <>
Subject mod_jk, JSESSION_ID and load-balancing
Date Mon, 24 Jun 2013 15:09:56 GMT
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_

    <Proxy balancer://nxcluster>
      BalancerMember route=nx
      BalancerMember route=nx2
      ProxySet stickysession=ROUTEID

    ProxyPreserveHost On
    ProxyPass /balancer-manager !
    ProxyPass / balancer://nxcluster/

    <Location /balancer-manager>
      SetHandler balancer-manager
      Order Deny,Allow
      Deny from all
      Allow from localhost

BTW, I'd like to keep jk for this configuration to stay consistent with
other settings.

Thanks for feedbacks.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message