----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Michael Amster wrote:
> 
> Fernando:
> 
> Fernando Salazar wrote:
> 
> >
> > What I think is being asked is:  If I use session objects -- which by
> > default are limited in scope to a single JServ instance --  how do I
> > support load-balancing my web server.  For example:
> >
> > - You have a server farm of n Apaches, each Apache running a single JServ.
> 
> Not ideal as you can have m x n configurations to do load balancing by app server
> usage not just by page usage.
> 
> >
> > - In front of the server-farm is a load-balancer, eg F5, CoyotePoint, etc.
> 
> Good.  Do you configure a VIP and map DNS to point to that one entry (i.e.
> www.mysite.com mapped to a set of load balanced Apache server IPs)?
> 
> >
> > - Someone comes to the site, the LB routes them to one of the Apache
> > instances; the JServ on that instance sets a session ID cookie.
> > - The next page they go to on the site, the LB again routes them, but this
> > time to a different Apache instance.
> 
> They won't send you to a different instance.  Even if they did, I would configure
> JServ load balancing so that all Apaches point to any of the JServ backends.  That
> way any Apache could route to any JServ.  Then even if you came into an Apache
> instance that was different from your original, the mod_jserv would examing the
> cookie and route your APJ traffic to the right instance of JServ.
> 
> >
> > - The session ID cookie doesn't exist on that JServ instance, so it looks
> > like there is no session data for this client.
> 
> I would configure my Load Balancer to recognize Level 4 traffic like HTTP and
> preserve sessions.  Most of them work that way unless a failure occurs on the
> original session box.
> 
> >
> >
> > If this is in fact the question, my suggestion is to get a load-balancer
> > that understands cookies, or that has "sticky" sessions, or to write code
> > whereby multiple JServ instances write/read session objects to a shared cache.
> 
> Yuck.  Use JServ loadbalancing and configure all your JServs to be routable by all
> your Apaches.
> 
> >
> >
> > If you're asking does load balancing between _multiple JServs_ get
> > wrecked-up by using sessions, I'm pretty certain the answer is No.  Jserv
> > includes the balance-set info in the session ID cookie, and uses it to
> > route returning clients to the correct JServ instance.
> >
> > Hope this helps.
> >
> > - Fernando

Thanks to Fernando, Michael, and Jon for explaining the question and
answering it ;-)

Steve, what you are trying to do is explained in the
howto-load-balancing document. 

I'd just add something :
in an ISP environment (i think Steve is in that case, I already
discussed with him), you will have ONE cookie per Servlet zone, which
allows you to host different applications under the same virtual host,
each zone with its own cookie. so a user can have n sessions ids (=> n
cookies)on the same virtual host if using 2+ applications.
And with this, the user Steve may be load-balanced on JServ A for zone1,
and JServ B for zone2, as mod_jserv takes care of zones to recognize
which cookie has to be used.
But, Tomcat(JSP2.2) will break this : JSESSIONID is THE name of the
cookie :-(.

Jean-Luc


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to