Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assuming I follow the steps in this answer to deploy a new version of an application without downtimes. When I route the users to the new application server instance, the application will not remember their session so they will be logged out without warning.

Is there a way to keep the sessions alive over multiple servers or to make a "session snapshot" or similar?

In my case it's a Java application if that matters.

share|improve this question
up vote 1 down vote accepted

Store the session data on a separate server that both application servers have access to.

share|improve this answer

Store the session in Memcache, and allow both servers to have access to the memcache backend.

You could store them on a shared disk, but that's slow and inefficient. Memcache is pretty much the right way to do this.

share|improve this answer

Look into clustering support for your server. Properly configured clustering will replicate your session data between the two servers.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.