tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Koecke>
Subject [PATCH] jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,jk_util.c
Date Fri, 05 Apr 2002 11:29:41 GMT

some days ago I sent a question for an only routing lb-worker. Costin asked for 
the patch and here it is.

I added two config-directives for the lb-worker:

- this is the name of the worker which should get the request if there is no 
session or no jvmRoute.

- the possible values are 'balance' and 'reject'. Explanation follows.

Behaviour of lb-worker:
a.) there is a jvmRoute and the corresponding node is ok:
     -> The request goes to the corresponding node

b.) there is no jvmRoute or the corresponding node didn't answered:
     -> if a local_worker was given. this one will get the request.
     -> if a local_worker was given, but it is in error state:
     fault_action == reject: the request gets an error.
     fault_action == balance: try to find another worker from the list of
                              balanced workers (c.).
     -> if no local_worker was given, go directly to c.).

c.) if no worker was found in a) and b) the normal balancing behaviour takes place.

I looked at cvs-repopsitory and it seems that jk_lb_worker.c and jk_util.c have 
the same version (1.8, 1.12) like mine from 

I need the fault_action, because our load balancer should not route a request to 
a node without a working local tomcat. So it is an error if an unrouteable 
request arrives at a node without a working local tomcat. And it is also an 
error to route it to one of the other nodes, because sometimes we switch off one 
node only by telling the load balancer not to use it for requests. In this case 
the modules should use this node only for requests with a session on it and not 
for requests without a session. But for other use cases it might be useful if 
mod_jk tries to balance the request in case of a failure of the local tomcat.

I hope it is useful. Sorry i haven't looked into jk2 at this time, but may be i 
get time to do it soon.

Dipl.-Inform. Bernd Koecke
Schlund+Partner AG
Fon: +49-721-91374-0

View raw message