tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Is it possible to expire jvmRoute cookie
Date Fri, 07 Dec 2012 09:16:19 GMT
Williams, Nick wrote:
>> -----Original Message-----
>> From: Christopher Schultz [mailto:chris@christopherschultz.net]
>> Sent: Thursday, December 06, 2012 5:08 PM
>> To: Tomcat Users List
>> Subject: Re: Is it possible to expire jvmRoute cookie
>>
>>> 2. How one additional user can be a problem in such a system? If he
>>> accesses a heavy-loaded system the things will be slow for him, but
>>> faster for all others, who close their browsers regularly.
>> Let's take a pathological example:
>>
>> Assumptions:
>> 1. Cluster has 3 nodes (A, B, C)
>> 2. Users never close their browsers
>>
>> Let's say that server A is rock-solid and never goes down. Servers B and C are running
Gentoo Linux or Debian Sid or Microsoft Windows or have flaky hardware and so they crash or
need to be  rebooted all the time; perhaps daily.
>>
>> Users on nodes B and C will constantly fail-over to node A.
>>
>> Those users will stick on node A pretty much forever.
>>
>> Therefore node A always gets most of the traffic, and nodes B and C only get "new"
users for a while before failing-over. Even if nodes B and C can handle 1/3 of the load, they
will get much less than that, and node A will, over time, accumulate users without bound.
>>
>> It would be nice to avoid this kind of situation.
>>
>>> So one could recommend that if things go slow to close one's browser,
>>> clean caches, or even reboot. ;)
> 
> "If I called tech support for a website and they told me I needed to close my browser
or reboot my computer to just to use their website, I would assume that they were complete
idiots. If I want to be lied to about what the problem is, I'll call my home broadband provider."
<-- HAHAHA ... nice one.
> 
> I agree with Chris, here. It's not a "common" situation, but it is a possible situation,
and if it occurred, it could get ugly quickly.
> 
> Earlier somebody (I'm sorry, I already deleted the email) suggested Tomcat returning
a 308 or 309 or similar to the load balancer to trigger a "re-balance" if the session is expired.
I think this is the best idea I've heard yet, solves the problem elegantly and simply, and
seems (relatively) easy to achieve (this coming from someone who has no knowledge of the code
used by mod_jk/isapi_redirector).
> 

I must admit that this sounds more elegant (and efficient) than my suggested interceptor 
module.

Alternatively, if one wanted to avoid touching mod_jk for this, maybe tomcat could return

a 302 redirect to the starting page of this application, if known ? (without 
jsessionid.jvmroute of course).



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message