Title: mod_jk load balancing
Hi Margaret,
 
Take a look at the link :-
http://java.apache.org/jserv/howto.load-balancing.html
This is a bit old, and it talks about load balancing with Jserv ( not tomcat ) -
using mod_jserv
 
I assume that the syntax for the load balacing portion is mostly similar,
but I have never tried it out using mod_jk
 
If you were using Jserv, these are the lines that have to be in your httpd.conf
file for Apache :-
 
-----------------------------------
ApJServMount /servlet balance://set1/zone1
 
ApJServBalance set1  PC1
ApJServBalance set1  PC2
ApJServBalance set1  PC3
ApJServBalance set1  SPARK 4
 
ApJServHost PC1 ajpv12://192.168.0.51:7777
ApJServHost PC2 ajpv11://192.168.0.52:8888
ApJServHost PC3 ajpv11://192.168.0.53:9999
ApJServHost SPARK ajpv12://192.168.0.54:7777
 
ApJServRoute JS1 PC1
ApJServRoute JS2 PC2
ApJServRoute JS3 PC3
ApJServRoute sp1  SPARK
 
ApJServShmFile log/jserv_shm
 
-----------------------------------------------
( this snippet is from the link described above. )
 
If anyone else has newer information - let us know,
 
-- Nipun.
-----Original Message-----
From: Royzen, Margaret [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 3:54 PM
To: [EMAIL PROTECTED]
Subject: mod_jk load balancing

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.


Reply via email to