Thank you! I added loadbalancer to the workers.list
worker.list=worker_1, worker_2, my_loadbalancer
(it was not there), and it starts balancing!
-----Original Message-----
From: Luc Vanlerberghe [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 4:49 AM
To: [EMAIL PROTECTED]
Subject: Re: mod_jk load balancing
Your workers.properties file contains the entry worker.list
Normally that lists the available workers and the JkMount directives
indicate which one to connect to
However, If you want to do loadbalancing, the workers.list should only
contain the name of your loadbalacing worker and none of the workers the
loadbalancer itself is using!
So with the configuration you gave, you should have
worker.list=loadbalancer
(The rest of the config including the JkMount directives looks correct)
If you want to switch back to no loadbalancing, change back to
worker.list=ajp12,ajp13
and connect to either one using JkMount
Luc Vanlerberghe
P.s.: I only did something similar using mod_jserv, but I don't see any
reason why this should be different for mod_jk
P.p.s.: Perhaps consider changing the names of your workers (In the
tomcat examples they are confusing as well, I know). ajp12 and ajp13
are names of two different communication protocols between the webserver
and tomcat...
If you change the names of your workers to worker_1 and worker_2, the
configs become
worker.list=my_loadbalancer
worker.worker_1.port=10101
worker.worker_1.host=localhost
worker.worker_1.type=ajp12
worker.worker_1.lbfactor=1
worker.worker_2.port=10103
worker.worker_2.host=localhost
worker.worker_2.type=ajp12
worker.worker_2.lbfactor=1
worker.my_loadbalancer.type=lb
worker.my_loadbalancer.balanced_workers=worker_1,worker_2
"Royzen, Margaret" wrote:
>
> Hi everyone,
>
> I am trying to configure the Apache server to balance the load between
> two independent Tomcat workers using ajp12 protocol.
>
> One worker is listening on port 10101, another one on port 10102. I
> put in my workers.properties file:
>
> worker.ajp12.port=10101
> worker.ajp12.host=localhost
> worker.ajp12.type=ajp12
> worker.ajp12.lbfactor=1
>
> worker.ajp13.port=10103
> worker.ajp13.host=localhost
> worker.ajp13.type=ajp12
> worker.ajp13.lbfactor=1
>
> worker.loadbalancer.type=lb
> worker.loadbalancer.balanced_workers=ajp12, ajp13
>
> At first I put in my apache configuration file :
>
> JkMount /apps-jsp/servlet/* loadbalancer
> JkMount /apps-jsp/*.jsp loadbalancer
>
> thinking, that this way mod_jk will process requests via loadbalancer
> worker, but I got "Internal Server Error"
> After that, I changed it back to:
>
> JkMount /apps-jsp/servlet/* ajp12
> JkMount /apps-jsp/*.jsp ajp12
>
> Servlets started working, but log files are showing no load balancing,
> all requests are processes via port 10101.
>
> Does anyone know, what should I put into Apache configuration file to
> achieve load balancing?
>
> Thank you very much in advance,
> Margaret Royzen.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]