I really have no idea...
I have a java web application which stores the session id in URL rather than using cookies. I want to run the application on 2 tomcat servers and fronting them with an Apache server for load balancing.
__ tomcat1
Apache ----/
\__ tomcat2
By setting the jvmRoute
to tomcat1
in the Tomcat server.xml
file, the url will become http://url;jsessionid=id.tomcat1
. So it is possible to achieve session stickyness by looking at the url, and route it to the corresponding server.
I know that mod_proxy
and mod_jk
and do the load balancing, but their sticky session only work when the session id is stored in cookies. In my case, the session id is encoded in the URL. How can I do the load balancing?