You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alex Burton <al...@e-plus.com.au> on 2003/05/19 07:11:16 UTC

Apache2 + mod_jk2 + tomcat configuration changes on the fly

Hi all,

I am somewhat new to the use of Apache2 + mod_jk2 with Tomcat 4.1.x.

Have been using tomcat for a long period but always in standalone mode. This
was until we started load testing an application on Linux and found it not
scaling the way we wanted, so we have moved to using Apache2 on the front
end to do a bit more of the leg work.

Enough background... the question I have is given mod_jk2's load balancing
abilites is it possible to bring tomcat servers into and out of service
without restarting Apache?
i.e. so you could take a tomcat out of service for a software load and then
switch to the new code by bring the tomcat server back into use.

Cheers,
Alex.


Re: jk2 how to set max conn in Apache?

Posted by Tim Funk <fu...@joedog.org>.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configtccom.html

Is it maxThreads?

(I haven't used jk2/apache2 yet to know)

-Tim

joseph lam wrote:
> In tomcat I can set the max # of jk2 processor but what is the 
> equivalent setting in Apache 2? Otherwise how can Apache know how many 
> connections the Tomcat will accept?
> 
> Joseph
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


jk2 how to set max conn in Apache?

Posted by joseph lam <jo...@quotepower.com>.
In tomcat I can set the max # of jk2 processor but what is the 
equivalent setting in Apache 2? Otherwise how can Apache know how many 
connections the Tomcat will accept?

Joseph

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Apache2 + mod_jk2 + tomcat configuration changes on the fly

Posted by Alex Burton <al...@e-plus.com.au>.
Many thanks. I'll let you know how we go.

-----Original Message-----
From: Mark Eggers [mailto:its_toasted@yahoo.com]
Sent: Tuesday, 20 May 2003 3:03 AM
To: Tomcat Users List
Subject: Re: Apache2 + mod_jk2 + tomcat configuration changes on the fly


Alex,

According to the documentation at:

http://localhost:8080/tomcat-docs/jk2/jk2/configweb.html

you should be able to do this.

The way it would work is to define a load balancer
group in workers2.properties along with all of the
workers (and channels) involved.

You then move all of the uri mapping statements out of
workers2.properties and into httpd.conf.  This is
recommended for large sites anyway according to the
mod_jk2 source (hash lookup versus serial lookup of
uri entries).

The format for putting a uri mapping in http.conf is
like the following:

<Location /[uri-name]/>
   Options Indexes FollowSymlinks MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
   JkUriSet lb lb:0
</Location>

I'm not sure on the JkUriSet syntax for a load
balancer, but in general anything you can do in
workers2.properties you can do with JkUriSet in
httpd.conf.

You could also use regular expression mappings, such
as:

<LocationMatch /[uri-name]/*.jsp>
   Options Indexes FollowSymlinks MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
   JkUriSet lb lb:0
</LocationMatch>

<LocationMatch /[uri-name]/servlet/*>
   Options Indexes FollowSymlinks MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
   JkUriSet lb lb:0
</LocationMatch>

You would then have to put in an Alis directive in
httpd.conf to catch any non-jsp and non-servlet
information.

I have not tried the load balancing stuff.  I don't
have access to multiple machines right now to try
this, but from all indications in the documentation
this is how it 'should' work.

HTH

/mde/
just my two cents . . . .

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Apache2 + mod_jk2 + tomcat configuration changes on the fly

Posted by Mark Eggers <it...@yahoo.com>.
Alex,

According to the documentation at:

http://localhost:8080/tomcat-docs/jk2/jk2/configweb.html

you should be able to do this.

The way it would work is to define a load balancer
group in workers2.properties along with all of the
workers (and channels) involved.

You then move all of the uri mapping statements out of
workers2.properties and into httpd.conf.  This is
recommended for large sites anyway according to the
mod_jk2 source (hash lookup versus serial lookup of
uri entries).

The format for putting a uri mapping in http.conf is
like the following:

<Location /[uri-name]/>
   Options Indexes FollowSymlinks MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
   JkUriSet lb lb:0
</Location>

I'm not sure on the JkUriSet syntax for a load
balancer, but in general anything you can do in
workers2.properties you can do with JkUriSet in
httpd.conf.

You could also use regular expression mappings, such
as:

<LocationMatch /[uri-name]/*.jsp>
   Options Indexes FollowSymlinks MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
   JkUriSet lb lb:0
</LocationMatch>

<LocationMatch /[uri-name]/servlet/*>
   Options Indexes FollowSymlinks MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
   JkUriSet lb lb:0
</LocationMatch>

You would then have to put in an Alis directive in
httpd.conf to catch any non-jsp and non-servlet
information.

I have not tried the load balancing stuff.  I don't
have access to multiple machines right now to try
this, but from all indications in the documentation
this is how it 'should' work.

HTH

/mde/
just my two cents . . . .

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org