tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Server affinity instead of session affinity
Date Tue, 23 Nov 2010 15:27:12 GMT
With the configuration below and your explanations, I suppose that there is some kind of 
load-balancing going on between the two machines.
What is used at the front-end to load-balance ?

An idea (for the moment vague) would be to use some intelligent front-end, which would 
decide (maybe as Mark wrote, in function of the client IP address) to start chanelling one

client to either machine 1 or machine 2 - and within it to Tomcat A,B,C or D - , set a 
cookie, and use this cookie later to keep sending the same client to the same back-end 
Kind of a session on top of a session..

There is also the question of why App1-4 have to be split between different Tomcats.
Why can you not run all apps within one single JVM/Tomcat ?

Andrew Hole wrote:
> There is a middleware-to-middleware connection between Tomcat A and Tomcat B
> using RMI (point-to-point protocol) and Tomcat A has in-memory data useful
> to App3.
> The same aproach in the second server: applications in tomcat d have RMI
> communication to tomcat c.
> thanks
> On Mon, Nov 22, 2010 at 11:58 PM, André Warnier <> wrote:
>> Andrew Hole wrote:
>>> Sorry for the inconvenience. I sent the email with wrong content.
>>> An example:
>>> Machine 1:
>>> Tomcat A
>>>  App1
>>>  App2
>>> Tomcat B
>>>  App3
>>>  App4
>>> Machine 2:
>>> Tomcat C
>>>  App1
>>>  App2
>>> Tomcat D
>>>  App3
>>>  App4
>>> Using session affinity, if I make a request to App1 and the Tomcat A in
>>> Machine 1 is selected. All the sequent requests will be redirected (within
>>> the same session) to the same Tomcat (tomcat A). However, if i make a
>>> request to App3, Tomcat B (machine 1) or Tomcat D (machine 2) could be
>>> selected. What I really want is that the request to App3 could be done to
>>> Tomcat B in machine 1 (the request was done using the same browser
>>> client).
>>>  Ok, now I get it.
>> My next question is : why ?
>> Why is it important that, having started on Tomcat A with App1, the same
>> client would get App3 on Tomcat B, rather than on Tomcat D ?
>> What do Tomcat A and Tomcat B have in common, that Tomcat C and D don't ?
>> And vice-versa.
>> And , should your scheme still work if in the future, Tomcat A and Tomcat B
>> were split onto two separate machines ?
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message