You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Duan, Nick" <ND...@mcdonaldbradley.com> on 2005/11/17 20:01:41 UTC
Session not sticky in 5.5 with load balancer
I am running an Apache httpd server as the load balancer with two tomcat
instances. All servers are on the same windows XP machine. The load
balancing works fine, but I am not able to make user sessions sticky
with either one of the tomcat instances. The test was done using is the
session example application bundled with the tomcat distribution.
Configuration:
Windows XP Professional Edition
Apache httpd 2.0.55
Mod_jk 1.2.15
Tomcat version 5.5
workers.properties file:
# Define some properties
#workers.apache_log=C:\ApacheHttpd\Apache2\logs\workers
#workers.tomcat_home=C:\devel\tomcat-5.5.12
#workers.java_home=C:\jdk1.5.0_03
ps=/
# Define 4 workers, 3 real workers using ajp12, ajp13, jni, the last one
being a loadbalancing worker
worker.list=loadbalancer
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8010
worker.worker1.lbfactor=1
#worker.worker2.cachesize=10
#worker.worker2.cache_timeout=600
#worker.worker2.socket_keepalive=1
#worker.worker2.socket_timeout=60
# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=localhost
worker.worker2.port=8009
worker.worker2.lbfactor=1
# Set properties for lb which use worker1 and worker2
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=worker1,worker2
worker.loadbalancer.sticky_session=1
Any comment/info/suggestion will be greatly appreciated!
ND
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Session not sticky in 5.5 with load balancer
Posted by Dominik Drzewiecki <dr...@post.pl>.
"Duan, Nick" <ND...@mcdonaldbradley.com> wrote"
> I am running an Apache httpd server as the load balancer with two tomcat
> instances. All servers are on the same windows XP machine. The load
> balancing works fine, but I am not able to make user sessions sticky
> with either one of the tomcat instances. The test was done using is the
> session example application bundled with the tomcat distribution.
Did you set jvmRoute on both tomcats to distinct values? By default it is
not specified on the Engine element in the server.xml.
cheers,
/dd
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Session not sticky in 5.5 with load balancer
Posted by ch...@yahoo.com.
Probably following article might help
http://forum.java.sun.com/thread.jspa?threadID=604278&messageID=3262414
"Duan, Nick" <ND...@mcdonaldbradley.com> wrote:
I am running an Apache httpd server as the load balancer with two tomcat
instances. All servers are on the same windows XP machine. The load
balancing works fine, but I am not able to make user sessions sticky
with either one of the tomcat instances. The test was done using is the
session example application bundled with the tomcat distribution.
Configuration:
Windows XP Professional Edition
Apache httpd 2.0.55
Mod_jk 1.2.15
Tomcat version 5.5
workers.properties file:
# Define some properties
#workers.apache_log=C:\ApacheHttpd\Apache2\logs\workers
#workers.tomcat_home=C:\devel\tomcat-5.5.12
#workers.java_home=C:\jdk1.5.0_03
ps=/
# Define 4 workers, 3 real workers using ajp12, ajp13, jni, the last one
being a loadbalancing worker
worker.list=loadbalancer
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8010
worker.worker1.lbfactor=1
#worker.worker2.cachesize=10
#worker.worker2.cache_timeout=600
#worker.worker2.socket_keepalive=1
#worker.worker2.socket_timeout=60
# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=localhost
worker.worker2.port=8009
worker.worker2.lbfactor=1
# Set properties for lb which use worker1 and worker2
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=worker1,worker2
worker.loadbalancer.sticky_session=1
Any comment/info/suggestion will be greatly appreciated!
ND
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org