I want to be able to Load Balance two Tomcat servers, that are broadcasting Session Data to one another, using Apache and mod_jk.
I've set up the Load Balancer and that works perfectly, however, I'm currently having to use sticky_sessions
to make this work. I want to be able to set sticky_sessions
to false
, and be able to only use a single Session ID to be sent to either Tomcat server.
Is there any specific config needed to make this possible, or is it even possible?
Here is my worker.properties
file:
worker.list=jkstatus, jkmanager, LoadBalancer
worker.jkstatus.type=status
worker.jkmanager.type=status
worker.LoadBalancer.type=lb
worker.worker1.type=ajp13
worker.worker1.host=TOMCAT-1-IP
worker.worker1.port=8009
worker.worker2.type=ajp13
worker.worker2.host=TOMCAT-2-IP
worker.worker2.port=8009
worker.LoadBalancer.balance_workers=worker2,worker1
worker.LoadBalancer.sticky_session=0
I have also set up jvmRoutes in each tomcat instance, as 'worker1
' and 'worker2
', like I said, with the sticky_session
set to '1
' this works, but I'm forced to use one Tomcat for the duration of that session which I don't want.
I need to be able to go to any Tomcat with a single Session ID, any help would be greatly appreciated.