Migrate apache->tomcat to nginx->tomcat
- by Slezhuk
Now we are using apache2 as frontend, and tomcat as backend. We are using mod_proxy_balancer and AJP. Also we are using stickysession by JSESSIONID cookie:
<Proxy balancer://backend>
BalancerMember ajp://127.0.0.1:8008 min=10 max=100 ping=5 connectiontimeout=40 ttl=60 retry=20 route=node-1
BalancerMember ajp://127.0.0.1:8009 min=10 max=100 ping=5 connectiontimeout=40 ttl=60 retry=20 route=node-2
ProxySet lbmethod=byrequests timeout=30
ProxySet stickysession=JSESSIONID|jsessionid nofailover=Off
</Proxy>
and using jvmRoute parameter in web.xml to add tail to JSESSIONID cookie:
<Engine name="Catalina" defaultHost="localhost" jvmRoute="node-1">
So far i did not found way to do this in nginx. Is there any solution for this? We are not using session replication, so getting sequential requests to same backend is crucial.