tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Load balancing - fail-over support with mod_webapp
Date Wed, 19 Dec 2001 07:01:04 GMT
I'm going to ignore the complete problem case where you have configured
Apache to be the "default servlet", and index.html is a frameset with 'n'
jsp frames (which will typically result in 'n' different sessions).  This is
why mod_webapp only supports forwardAll, and forwardAll is the default for
Ajp.

Most 3.3 methods map well to Catalina.  It's either an xxxListener or a
Valve.  This is one of the problem cases that falls through the cracks.  As
such, I personally can't see how to do this better than Costin's idea of
adding a jvmroute attribute to the Manager.  Instead, I'm going to try and
describe the programmatic requirements and hope that someone smarter than me
can see how to implement it.

Apache knows who it sent the request to, and can (and does in 3.x) pass this
information on to the Request object.  If, as it happens, that the servlet
that eventually gets executed at the end of the pipeline (or a rogue
Valve/Filter) creates a new Session (e.g. Listener), then somebody with
access to the Request object (e.g. Valve)  needs to re-set the SessionId to
be SessionId += "." +request.getJvmroute().  This has to happen before the
servlet regains control (so that response.encodeURL works), and before the
cookie is set (or at least sent).

Of course, what I care about is Apache.  However in the above you can
s/Apache/IIS/ or s/Apache/IPlanet/, and get to the same point.
----- Original Message -----
From: "Craig R. McClanahan" <craigmcc@apache.org>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: Tuesday, December 18, 2001 6:09 PM
Subject: Re: Load balancing - fail-over support with mod_webapp


>
>
> On Tue, 18 Dec 2001 costinm@covalent.net wrote:
>
> > Date: Tue, 18 Dec 2001 14:14:10 -0800 (PST)
> > From: costinm@covalent.net
> > Reply-To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> > To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> > Subject: Re: Load balancing - fail-over support with mod_webapp
> >
> > On Tue, 18 Dec 2001, Craig R. McClanahan wrote:
> >
> > > The load balancer routing from JK hasn't ever been implemented in
> > > Catalina yet.  Patches welcome :-).
> >
> > Can we get a 'setRequest' method on Manager ? I'm trying to find
> > workarounds, but that would be the simple solution.
> >
>
> In other words, a *single* "request" property for the entire Manager?
> Wouldn't that have problems when you had simultaneous requests in
> progress?
>
> Same thing would happen (but on a smaller scale) if you added setRequest
> on the session instead -- it's legal to have multiple simultaneous
> requests.
>
> > Again, adding support for load balancer is simple - the Manager just
need
> > to append the vmroute to the generated session id. How you get the
session
> > id is the problem - it is available in request, or it could be
configured
> > in server.xml if getting from the request is not possible.
> >
>
> The request (and therefore the response because they maintain mutual
> references) knows what the session id is ...  is that good enough?
>
> > ( right now I'm trying to finish jk2 asap - when I'm done I'll try again
> > to fix the lb for 40 if nobody does it before )
> >
> > Costin
> >
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message