You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stephan Budach <st...@jvm.de> on 2001/06/29 11:11:31 UTC

workers.pepoerties, loadbalancing

Hello,

i´ve browsed through the archive, but i didn´t come up with something
useful to me, so i´ll try here.
I´d like to do loadbalancing between 2 different tomcats, on two
different maschines. This is the layout of the maschines:

Host 1: tomcat 3.2.1, apache
Host 2: tomcat 3.2.1, apache

Now there´s a round robin dns of the name host wich alters between Host1

and Host2 so that the users get on one of the two maschines. Now, i
wanted
to load balance those tomcats and i thought the following
workers.properties files would do the trick:

Host1:
workers.tomcat_home=/usr/local/jakarta-tomcat-3.2.1
workers.java_home=/usr/local/java/jdk1.2.2/
ps=/

worker.list=loadbalancer

worker.a01.port=8007
worker.a01.host=Host1
worker.a01.type=ajp12
worker.a01.lbfactor=1

worker.a02.port=8007
worker.a02.host=Host2
worker.a02.type=ajp12
worker.a02.lbfactor=0.001


worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=a01,a02


and Host2 resp.:
workers.tomcat_home=/usr/local/jakarta-tomcat-3.2.1
workers.java_home=/usr/local/java/jdk1.2.2/
ps=/

worker.list=loadbalancer

worker.a01.port=8007
worker.a01.host=Host1
worker.a01.type=ajp12
worker.a01.lbfactor=0.001

worker.a02.port=8007
worker.a02.host=Host2
worker.a02.type=ajp12
worker.a02.lbfactor=1


worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=a01,a02


When i configure Netscape to always ask me before accepting a cookie, i
always get a session that is bound to Host1, although i  connect to
Host2 (say via it´s ip address).

Can anybody tell me what´s wrong with this setup?

Thanks,
Stephan