tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Labanowski <...@osc.edu>
Subject Re: Multiple Tomcat workers (using mod_jk)
Date Thu, 13 Sep 2001 04:23:08 GMT
I am not the developer, so I do not know... But this is what I think:
The workers are different instances of Tomcat, and can reside even on
different machines, i.e., obviously they run under different VMs
At the same time, the load balancing worker should send the request
which belong to the same session to the same worker for processing...
>From what I know, if you configure this right, the Apache talks only to
a single, load-balancing worker, and has no control over which worker
does the actuall processing, unless you mount different contexts to different
workers, but then you are in control...

But yes, there is a lack of good documentation on doing load balancing with
mod_jk, though there is plenty on mod_jserv.

Here are some excripts from someone who tried this:
=============================
From: "David Cassidy (Programmer)" <dcassidy@hotgen.com>
To: tomcat-user@jakarta.apache.org
Subject: Re: Tomcat and Apache on diffenet machines
Date: Fri, 25 May 2001 15:10:36 +0100

Yup this is possible ....
 
and if you are using the loadbalancing module ( so you can have more
than 1
tomcat for your apache(s) to talk to) essential
 
in workers.properties you should find something like ...
 
worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
worker.ajp12.lbfactor=1
 
To define another service try ...
 
worker.external_1.port=8007
worker.external_1.host=192.168.34.43
worker.external_1.type=ajp12
worker.external_1.lbfactor=1
 
You can define as many of these as you want.
 
You can then define a loadbalancer ( if you want to)
 
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp12, external_1, external_2 etc
 
then
worker.list=loadbalancer
and you have got load balancing
 
If you just want to use a single tomcat host then
worker.list=external_1
 
in your mod_jk.conf
 
JkMount /test/* loadbalancer
 
or
 
JkMount /test/* external_1
====================================

Jan


On Thu, 13 Sep 2001, Tony Vinayak wrote:

> Folks,
> 
> I've got a couple of quick newbie questions:
> Environment: Apache 1.3.20 on Solaris 8; Tomcat 3.2 (using mod_jk); Apache
> and Tomcat running on the same box.
> 
> If I configure and run multiple Tomcat workers on the same machine
> (listening on different ports of course), and let's say they are all using
> ajp13 connector, do all those workers run in the SAME of DIFFERENT VM ?
> 
> The reason I ask is that I've got a thread-unsafe servle that I want to
> deploy implementing "SingleThreadModel" across multiple concurrent instances
> of Tomcat, allowing concurrent requests to be processes. As the request gets
> into Apache, using mod_rewrite I want to direct it to one of the several
> Tomcat workers.
> 
> regards,
> Tony
> 

Jan K. Labanowski            |    phone: 614-292-9279,  FAX: 614-292-7168
Ohio Supercomputer Center    |    Internet: jkl@osc.edu 
1224 Kinnear Rd,             |    http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163      |    http://www.osc.edu/


Mime
View raw message