Hi, I have been working on load balancing Apache/Tomcat clusters.

In mod_jk, the fail-over is done in the function
get_most_suitable_worker. Basically if the worker who initiated the
session is available (i.e. not in error state), use it, otherwise loop
through the workers and select either the one with the lowest load
balancing value OR one that has been in error for at least
WAIT_BEFORE_RECOVER seconds if such worker exists. Thus the faulted
workers are privileged when selecting a worker for a request whose
worker designated by the jvmroute is not available.

There is though no algorithm implemented which will map all requests to
the same 'backup' worker, thus either the worker which created the
session (the one in the jvmroute) is available, either another worker
will be selected, but in the latter case there is no guarantee that
'second choice' will be the same for the next requests.

Therefore re-routing does exist in mod_jk and works, but it is not
optimal for your case, the worst thing being the
dispatching of incoming requests to a different worker each time, your
distributed session management would therefore give the parenting of the
session to a different worker each time, far from optimal!

Mathias.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to