Plana, Richard schrieb:
Hi,
I've two tomcat servers being proxied and load-balanced by httpd using
mod_ajp (using balancer:). However, it seems when the proxy switches
from one server to another, the user session gets lost.
Could people recommend a way to correct my setup for doing
load-balancing with this scenario?
Oddly enough, it seemed to have functioned well when using mod_jk.
If you don't want to replicate all sessions between your tomcat nodes,
then use stickyness in the load balancer. This means, once a session has
started for a user on some node, all further requests of the user
belonging to this session will be routed to the same node.
Give each Tomcat in server.xml a unique jvmRoute and then set the route
parameter to the value of the corresponding jvmRoute of the load
balancer member in your mod_proxy_balancer configuration. Look for route
in the mod_proxy documentation page.
Caution: the Tomcat instances need to have different jvmRoute values.
The principles in mod_jk are the same. At least you need to set the
jvmRoute. In mod_jk stickyness is the default, and the name of the
worker I the default route. So you might have been lucky to set your
jvmRoute to the worker names and that was sufficient in the mod_jk case.
Regards,
Rainer
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]