You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Ma...@iroise.net on 2002/05/06 15:59:20 UTC

Load balancing worker in JK2

Hi,

to continue the  discussion on load balancing workers  in JK2, I would
suggest as  Bernd's initial patch did,  to add two  properties for the
load balancing worker, one which will be the name of the local worker,
and  another  one  stating  what   to  do  if  this  local  worker  is
unavailable.

Three fields  could be added to  the worker structure,  one which will
hold the  index of the local  worker in the  lb_workers array, another
one  holding  the  behavior to  adopt  in  case  the local  worker  is
unavailable, and a third one holding the local worker name.

jk2_lb_refresh needs  to be  modified to check  if a local  worker was
specified and if this worker is  indeed in the array lb_workers, if so
the  index  of  the  local  worker  will  be  updated  in  the  worker
structure.  A sanity  check might  also be  done to  ensure  the local
workers's lbfactor  is set  to 0 (even  though I  think we can  have a
default worker with a non zero lb_value since we know its index).

In get_most_suitable worker, if  no session route was specified, check
that  the local_worker  is  available,  if not  check  what action  to
perform  (either reject  the request  or load  balance it  normally on
other   workers).  Only   sessionless  requests   will   therefore  be
unconditionnaly dispatched  to the local  worker, a request part  of a
session but whose  worker has failed will be  load balanced to another
worker normally.

This  way we should  be able  to have  HW load  balancers in  front of
Apache/Tomcat and  having them  detect the failure  of a  local Tomcat
thus declaring inactive the associated Apache.

No specific value of lbfactor needs then to be specified.

Mathias.

-- 
--  Credit Mutuel de Bretagne  --  DST / Reseaux et Systemes Distribues
--  32 rue Mirabeau -- Le Relecq-Kerhuon -- 29808 Brest Cedex 9, FRANCE
--  Tel +33298004653 - Fax +33298284005 - Mail: Mathias.Herberts@cmb.fr
--  Key Fingerprint: 8778 D2FD 3B4A 6B33 10AB  F503 63D0 ADAE 9112 03E4

--
Ce message et  toutes les pieces jointes (ci-apres  le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute  utilisation ou  diffusion  non autorisee  est interdite.   Tout
message  etant  susceptible  d'alteration,  l'emetteur  decline  toute
responsabilite au titre de  ce message  s'il a  ete altere, deforme ou
falsifie.
                -----------------------------------
This message and any  attachments (the "message") are confidential and
intended  solely   for  the   addressees.  Any  unauthorised   use  or
dissemination is prohibited. As e-mails are susceptible to alteration,
the issuer shall  not be  liable for  the  message if altered, changed
or falsified.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>