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
[EMAIL PROTECTED] 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: <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>