Rob,

On 2/26/21 16:47, Rob Sargent wrote:
Given a single webapp, what's the difference between server restart and webapp reload in terms of current open sessions?

That depends upon a few things.

If you do not have session-persistence enabled, then you will lose all your sessions in either case.

If you do have session-persistence enabled, then reloading your application will allow requests arriving for that application during the restart to be accepted and wait for the application to become available. If, instead, you restart your server (which means stopping/starting the JVM, or at least stopping/starting all of the Connectors in an embedded scenario), then there will be a period of time where clients might receive any number of errors such as "connection refused", etc.

If you are going embedded (which it sounds like you are from other recent posts), are you also using a load-balancer and some kind of clustering, management, etc? If so, you should be able to configure your reverse-proxy/lb to ensure that Tomcat is actually available before proxying requests to that node, or failing-over to another node.

If you want true high-availability, you will either want a shared session-store (e.g. db, memcached, etc.) or clustering (using Tomcat's clustering) in which case restart versus reload doesn't matter much.

-chris

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

Reply via email to