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

Alec,

On 7/24/13 4:38 PM, Tomcat Random wrote:
> So set the LB stickiness to the same
> <session-timeout>n</session-timeout> number as in web.xml.

That's what I'd do, if...

>> "Assuming that the lb is updating the last-touch time for every
>> request mentioning the session"
> 
> Could you explain this a little further. How would the LB be
> monitoring requests mentioning the session. Would that be a request
> that had *JSessionID *in it?

Correct. The lb needs to know that a particular user should be sent to
a specific application server. Usually, that's done by sniffing the
JSESSIONID cookie, or by reading the "jsessionid" path parameter from
the URL. In either case, the lb needs to either keep a lookup table of
session ids and backend servers to which they are bound (I believe
this is how most lbs work) or be clever enough to know that Tomcat can
give it a hint as to the server's identity -- this is what mod_jk does.

mod_jk does not maintain a huge registry of session->server mappings.
Instead, the session id has the backend-server's identity embedded in
it (it comes from the "jvmRoute" attribute of the <Engine> element in
server.xml) and knows which jvmRoute maps to which app server (you
have to configure this yourself).

I suppose a non-mod_jk lb could be taught to do this kind of thing.
I've never used one, so I can't give you any specific advice.

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

iQIcBAEBCAAGBQJR8FDHAAoJEBzwKT+lPKRYt4MP/2DKgn+cAOZNSBpyttRf4gKe
ols2Y7yG15w04A+ymMaBc+vLNKAlafQMTrwkfCbfKsOP652ASs4JYIz/zXy0d5GT
IP0K2CWfhLnpoXcPxw9at7KagX8JBn+4qoQQyeZExda4x+2tnbPN1hOE1a2Aez5Y
a4NgQvggMN2azF43aJa3jlbO9jLRQDEWYXfgw9rtDALWMv+yS+c+a+wS2Fv2Nniz
I+w/yrTYFsR4IRF/upw2iHKG8SXlaJ/Q2rf3lAIP4yZtUyQPrbchs5bfnC8efpJC
CpKqmXeoQX2NH0zdOQsSIvRmmKEiKJJR6lnCoxq/ssQq16zbQG8Tb1c0GDdX4FzJ
LbMlO0XYGGnd5+X+CT4XtRxDoL8MCZf+qvYikSEO5LvTuuMdtO00JzDVvGb6qcsN
sFm28S4vN0z8P+bk9ioob5N76zWNoQAchxQtqTKJg/JI9KM/lKkQ1fw/NfcrW8Sc
AO3TrGPK2Bw0j7Q76hSDtvjiof9fk+6VgD40SEi09aneOo7a67wxq/2aPG8PchMO
eMFtICuDMX1qgDBM0mBU+ed0V1quWor1ax/20CXQYyY2BjfniEDlGz9aAn4JMz3b
OVwkHyPYmi6/FftgK4xAZM4AFlP7uRwxrYRqPuKRXu4R9wIxJwauYEoZ0p6n3Fax
jbGeRC/lwRjECS+djhEd
=8uP2
-----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