You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ac...@saysit.com on 2002/09/21 03:50:07 UTC
loadbalancer in workers.properties
Hi All.
The doco's suggested that I can have 1,2 or more Tomcats running
(ideally one on each box).
The scripts for httpd.conf suggested a piece if s/w called "loadbalancer
eg.
...
DocumentRoot "/var/www/html"
...
JkMount /*.jsp loadbalancer
JkMount /servlet/* loadbalancer
***
etc
Where can I download this "loadbalancer" ?
THX
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: loadbalancer in workers.properties
Posted by ac...@saysit.com.
David Cassidy wrote:
>
> it's part of mod_jk
I am totally flabbergasted...
Bounce the servers and it works again.
I must have had some parameters not set correctly ???
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: loadbalancer in workers.properties
Posted by ac...@saysit.com.
David Cassidy wrote:
>
> it's part of mod_jk
Thanks
I've an unusual problem : I got Apache collaborating with Tomcat on the
same box. Then I seperated the two and it worked. I rebooted the
machines, now Apache won't talk with Tomcat. I looked in log/error_log ,
it seems the Apache machine keeps trying to look for the examples in the
same box rather than in the Tomcat box. Apache won't find it there
because I haev renamed that directory...
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: loadbalancer in workers.properties
Posted by David Cassidy <da...@twocats.co.uk>.
it's part of mod_jk
as I can assume that you have got mod_jk loaded and installed, working
correctly
for one server I shall begin ...
In your workers.properties you will find an entry titled
worker.list
this will probably look like
worker.list=ajp13
You will then find the definition of ajp13 looking something like ...
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
The section of loadbalancer will look like ...
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13, ajp12
Now... Let us assume that you have 3 servers and they are all the same
spec.
So you want to balance the load evenly..
( I am also assuming that you only have one apache server.)
ie your machines looks like :
+------+
|Apache|
+------+
|
+--------+---------+
| | |
+-----+ +-----+ +-----+
| TC1 | | TC2 | | TC3 |
+-----+ +-----+ +-----+
You need to define entries for your 3 tomcat servers...
( change the IP's to match yours..)
worker.TC1.port=8009
worker.TC1.host=192.168.10.1
worker.TC1.type=ajp13
worker.TC1.lbfactor=1
worker.TC2.port=8009
worker.TC2.host=192.168.10.2
worker.TC2.type=ajp13
worker.TC2.lbfactor=1
worker.TC3.port=8009
worker.TC3.host=192.168.10.3
worker.TC3.type=ajp13
worker.TC3.lbfactor=1
change these to match the above :
worker.loadbalancer.balanced_workers=TC1,TC2,TC3
worker.list=loadbalancer
And Bingo you have a working loadbalanced trio of Tomcat servers.
If you have 3 apache servers ie like
+-----+ +-----+ +-----+
| A 1 | | A 2 | | A 3 |
+-----+ +-----+ +-----+
| | |
+--------+---------+
|
|
+--------+---------+
| | |
+-----+ +-----+ +-----+
| TC1 | | TC2 | | TC3 |
+-----+ +-----+ +-----+
you just need to setup the same workers.properties on all the apache
servers...
Hope this helps
David
achana@saysit.com wrote:
>Hi All.
>The doco's suggested that I can have 1,2 or more Tomcats running
>(ideally one on each box).
>The scripts for httpd.conf suggested a piece if s/w called "loadbalancer
>eg.
>...
>DocumentRoot "/var/www/html"
>...
>JkMount /*.jsp loadbalancer
>JkMount /servlet/* loadbalancer
>***
>etc
>
>Where can I download this "loadbalancer" ?
>
>THX
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>