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

All,

I've been using sticky sessions with mod_jk and I can see that there
is a bit of a problem when attempting to take a backend Tomcat server
out of load-balanced rotation: a user who never (or rarely) restarts
their web browser will keep the same JSESSIONID cookie forever and
therefore end up with the same backend server whether it has been
disabled or not.

Quick series of events:

1. User visits load-balancer and gets a randomly-assigned backend
server/route. We'll call this route "X". The JSESSIONID cookie set by
the backend server is therefore foo.X.

2. User's requests are routed by mod_jk to route X.

3. Route X is disabled using mod_jk's status worker

4. User's session on server X expires.

[Technically, 3 and 4 can happen in either order]

5. User makes a new request to the load-balancer, and mod_jk sees the
JSESSIONID cookie still set to foo.X. mod_jk sends the request to
route X which allows the user to login, etc.

Thus, it takes more time than necessary to bleed all the traffic from
route X for maintenance, etc.

Is there a way for mod_jk to ask route X if the session is *still*
valid? It seems that mod_jk will not re-route a request that looks
like it's got a valid session id to a new (active) backend server
unless the backend server X is actually down.

Any ideas?

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJToFQqAAoJEBzwKT+lPKRYQgEP/0oIOU1bmm6z0aKlvuW4oVnB
5ozq6hyXCQlpIN1/eORIZdnpz3vkqsFSmsVfyZLpfgJcWjn3yjiKt9M1Ywe9MQyH
mezY1Pd5ZJoUfoopHTyw3i2cxeWfvKMJTAe1nZ1XaOHoYc+iYGGrRxDYExQq2CDV
V6d55ftH9iFuMADPwcgdWhydap8A0ojeskpKsn6UEV3c1qO8uGMKvDpDb4/bnh1S
m5Ri5/Jc8mFnIBQEWOeAIFlUu9VciFQ7XF560ERCAoZ6NGhBVFJjdeEFM1iWprO/
kBawz5IXUAcNHqcZn5CNTvumsQKpGQpw54l2+iUkGUmkbBWrR2CULIzulLLdLnHF
BteWdt7qZFWgth7l4nY+SR5MpzNH3NBzzD7Cr+l861OGDzTG+A4rw81B5mS/Hmuf
/bsbnnIKeS+uREx1tR/F2+/omhhFaRpleyRFrH+NAEtU7sw1th+HO4mB3eSoioiN
xNhk/SsWWsslJH3MrD3Bi/iw3ULp5JYiaLCoD+yX18P06TzBxO7aQBK9LuCU58G4
1gN4rm/2+z33YS9URhEohWDJtTXzIEbwA7g94+oB1eAdPksWy1+0oPz7IAKyzCyb
bHZnI+v/D5w9h8lcMwJbfEx7Lg+0vxnAe4PBef6rZfhTynB2tYKsC6U/nFgwwh73
s6N1b1A+N1uKM5Ab62Jl
=X1DE
-----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