tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Schmid <travis.sch...@peregrine.com>
Subject RE: Mod_Jk and Multiple Tomcats
Date Thu, 15 Nov 2001 19:17:36 GMT
David,

We are using Tomcat 3.2.3 with mod_jk but it should be similar in 4.0.  We
set it up like this to utilize multiple processors and machines efficiently
for better scalability.  Here's what we did:

We setup Apache to start 4 Ajp13 workers all communicating on a different
port number.
Then we setup 4 instances of Tomcat (as NT services) listening on those
ports.  All of the instances use the same webapps directory and serve the
same files.  Make sure you set your JkMounts to use the loadbalancer worker
(or whatever you named it).

Good luck

Example workers.properties fragment:
worker.list=loadbalancer, w8009, w8011, w8013, w8015

worker.w8009.port=8009
worker.w8009.host=localhost
worker.w8009.type=ajp13
worker.w8009.cachesize=10
worker.w8009.lbfactor=10

worker.w8011.port=8011
worker.w8011.host=localhost
worker.w8011.type=ajp13
worker.w8011.cachesize=10
worker.w8011.lbfactor=10

worker.w8013.port=8013
worker.w8013.host=localhost
worker.w8013.type=ajp13
worker.w8013.cachesize=10
worker.w8013.lbfactor=10

worker.w8015.port=8015
worker.w8015.host=localhost
worker.w8015.type=ajp13
worker.w8015.cachesize=10
worker.w8015.lbfactor=10

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=w8009, w8011, w8013, w8015

Example 8009server.xml fragment:
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler" 
       value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
            <Parameter name="port" value="8009"/>
        </Connector>

Example 8011server.xml fragment:
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler" 
       value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
            <Parameter name="port" value="8011"/>
        </Connector>

Example 8009wrapper.properties fragment:
wrapper.server_xml=$(wrapper.tomcat_home)\conf\8009server.xml

Example 8011wrapper.properties fragment:
wrapper.server_xml=$(wrapper.tomcat_home)\conf\8011server.xml

Example 8009Tomcat NT service installation:
jk_nt_service.exe -I 8009Tomcat
c:\jakarta-tomcat-3.2.3\conf\8009wrapper.properties

Example 8011Tomcat NT service installation:
jk_nt_service.exe -I 8011Tomcat
c:\jakarta-tomcat-3.2.3\conf\8009wrapper.properties

> -----Original Message-----
> From: David Wilson [mailto:dwilson@revenuetech.com]
> Sent: Thursday, November 15, 2001 10:57 AM
> To: Tomcat Users List
> Subject: Mod_Jk and Multiple Tomcats
> 
> 
> Does anyone know how to do the following:
> 
> For testing purposes we want to have one Apache running and 
> use multiple
> Tomcats. We are using mod_jk and I can only find information 
> on multiple
> tomcats via JServ. But you cannot use jserv and mod_jk at the 
> same time. Can
> I do this with mod_jk?
> 
> 
> We are running Apache 1.3 and Tomcat 4.0.1
> 
> Oh and if anyone asked me any questions over the last week on 
> this users
> group I didn't get it b/c of email problems.
> 
> Thx,
> David
> 
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message