0

We are having four Tomcats load balanced with Apache mod_proxy (mod_ajp). mod_proxy is configured as follow, lbmethod=byrequests and sticky_session enabled. But occasionally we have noticed that apache is not honoring sticky session. i.e. Apache is sending the request that is supposed to be received by Tomcat 1 to Tomcat 2, thus resulting in the user losing the authentication. Will mod_proxy always honor sticky session or not, if not what are the scenarios it will disregard sticky session setting.

UPDATE:

Proxy config in httpd.conf

<Proxy balancer://app-lb>
     BalancerMember ajp://10.**.**.**:5009/app min=1 max=300 route=r1 loadfactor=1 timeout=300 KeepAlive=On
     BalancerMember ajp://10.**.**.**:5010/app min=1 max=300 route=r2 loadfactor=1 timeout=300 KeepAlive=On
     BalancerMember ajp://10.**.**.**:5011/app min=1 max=300 route=r3 loadfactor=1 timeout=300 KeepAlive=On
     BalancerMember ajp://10.**.**.**:5012/app min=1 max=300 route=r4 loadfactor=1 timeout=300 KeepAlive=On
     ProxySet lbmethod=byrequests
</Proxy>
ProxyPass /app  balancer://app-lb stickysession=JSESSIONID

Connector config in server.xml

<Connector port="5011" protocol="org.apache.coyote.ajp.AjpNioProtocol" keepAliveTimeout="30000" connectionTimeout="30000" redirectPort="8443" maxPostSize="10485760"/>
msmani
  • 51
  • 3

0 Answers0