-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André,

On 12/7/12 4:16 AM, André Warnier wrote:
> Williams, Nick wrote:
>>> -----Original Message----- From: Christopher Schultz
>>> [mailto:ch...@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).

That's definitely an idea worth pursuing: an expired session id could
return 302 *and* strip the jsessionid path parameter *and* send a
Set-Cookie JSESSIONID; expiration=0 header (which deletes the cookie).
The client would re-try and the balancer would re-balance.

Konstantin, what do you think? Obviously, this shouldn't be the
default operation of Tomcat, but perhaps a setting that could be
enabled on the session manager?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEAREIAAYFAlDCIF4ACgkQ9CaO5/Lv0PDJoACgw9Ys1rnye8NK24fFCtZ6x8Dj
PKwAn0kws7TwyT6T4qURPbq3vtkXjxWI
=2vJC
-----END PGP SIGNATURE-----

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

Reply via email to