jay wick

Greenhorn
+ Follow
since Jan 28, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jay wick

If you mean "why would you want to load balance" then the answer is to read some of these articles:

-- http://www.javaworld.com/jw-02-2001/jw-0223-extremescale.html

-- http://www.onjava.com/pub/a/onjava/2001/09/26/load.html

-- http://www.onjava.com/pub/a/onjava/2002/07/17/tomcluster.html

The basics of load balancing in most articles assumes that you will use multiple independant physical machines.

There are situations where you might attempt to use load balanning w/o seperate machines, though not many.

There is a nice article that has specific setup to use Tomcat in a highly scalable load balanced configuration:

http://www.onjava.com/pub/a/onjava/2004/04/14/clustering.html
(the first part of the article is pretty basic: http://www.onjava.com/pub/a/onjava/2004/03/31/clustering.html)
19 years ago
Sam:

Ben is correct, you can have the JAVA_HOME set to differnt JDKs for each Tomcat instance.

This would be a somewhat complicated installation. I have tried it with multiple VirtualHost entries in the apache conf and there are several gotchas.

I decided to use apache VirtaulHost to separate catalina_home installations and create a worker for each one, with separate web server doc roots.

I tried to get separate installations of the workers.java_home & workers.tomcat_home, but I am pretty sure that won't work without multiple apache homes. Then you would need at to proxy requests so that both installation would like to clients like they are just on port 80, that means that you need a "master" apache and one at each proxy "end point" -- a lot of work.

I got frustrated and decided that I could live with 'sharing' the workers.tomcat_home with one of the virtual host cataline home's.

Seems to work OK for development, though I would think in production this would be bad -- if your app breaks the java that is running the workers then POOF all the apps go down...
[ January 28, 2005: Message edited by: jay wick ]
19 years ago
lin:

All depends on what you have set up.

If you want static content (html) to be servered from the / context by the web process on port 80 then do not configure Tomcat to do so.

There is no port conflict in the "default" set-up, the server.xml (which is the control mechanism for which ports Tomcat will listen on) has a JK connector on 8009 and an HTTP1.1 listener on 8080. You may change those, but if you attempt to change them to 80 apache will not start -- you get "port in use" errors.

You must start Tomcat first. Using Tomcat to serve all content is possible...
19 years ago
Hi George.

I don't know if you figured out your problem, but it looks to me that you need a JKMount for the "praxiswebapp".


I would be nice if there were a little map in the Jakarta documentation that said stuff like that.

For instance, I found out the hard way that you may unexpectedly get Apache trying to send requests via AJP12 to a listener on 8007, it seems to be some sort of hard coded fall back feature of mod_jk.
19 years ago