I have a pair of tomcat servers sitting behind an apache server running modjk2. the apache server load balances sessions to the tomcat servers (using
x.sticky_session=True). This all works fine, however we would like to be able to install new code on the tomcat servers without terminating any sessions.
We are unable to use tomcat's session serialization since not all of the stored objects are serializable and the downtime might be too long.
Currently we bring down TomcatA (effectively killing all of its current sessions), install the new code on it, start it up and then when apache starts routing requests back to it, do the same on TomcatB.
What we would like to do is, disable new sessions on TomcatA (and maybe shorten the lifespan of existing sessions), and then when all of its sessions have expired, bring it down to do the installation .. followed by the same for TomcatB.
Has anyone solved a similar problem, or have any advise regarding this kind of setup? Currently I'm not sure if apache or tomcat should be responsible for the disallow of new sessions...