Hi,

we want to use tomcat 3.2.1 in a cluster-environment. This is not a
request that someone else should code something. I think I have a
solution, but may be others are interested in it too.

We have, lets say three cluster-computer (server) and one simple
load-balancer. The load-balancer doesn't look in the Packets and doesn't
know something about Sessions etc. The server are running with apache +
tomcat. apache with mod_jk. The following things could happen:

- a request arrives at a server without a session => it should be routed
to tomcat on this server
- a request with a session on another server arrives => should be routed
to the other server
- a request with a session on this server arrives => should be routed to
this server
- a request with a session on a server which is down arrives => use
another server and send him the request. The session is not present
there and our application handles this

Is there a way to get this with existing modules? My solution plays
around with mod_jk as follows:

The easiest way is to switch off load-balancing and recovering with an
additional property in the config. But I could understand if someone
says this should be a new module. But it could work with mod_jk. For
this I use the lb_worker which controls three ajp13-worker on every
server. The ajp13-worker are connected to the three tomcats. Now I have
two possibilities:

- set the lb_value of the worker for the local tomcat to 1 and >1 for
the other workers, then switch off load-balancing by setting lb_factor
to 0.0. This should give an error because of the validate-function, but
it could be fixed with a small patch.
- setting the lb_value for the worker which is connected to tomcat on
the same server to -1 and 1 for the others and the lb_factor to a
negative value. 

Both solutions are incorrect if one of the tomcats goes down, because of
the recovering. So I come to the first idea, to use an additional flag.
If it works here, are there interests in a diff of mod_jk?

Bernd
-- 
Dipl.-Inform. Bernd Koecke
UNIX-Entwicklung
Schlund+Partner AG
Fon: +49-721-91374-0
E-Mail: [EMAIL PROTECTED]

Reply via email to