Session persistence
When persistent sessions are enabled, the Session Manager persists session information into a database as specified on the data source connection settings. If persistent sessions is not enabled, the Session Manager discards the session data when the server shuts down.
WAS avoids using the database to read in or access the session when it is determined that the entry in the session cache is still the most recently updated copy. To tune the cache, set the maximum in-memory session count and allow overflow. For more information, see Maximum in-memory session count.
In addition to the cache table itself, the product maintains a list of the most recently used sessions in memory, ordered from least to most recently used. Whenever a session is accessed, it is added to the most-recently-used end of the list. When the cache table becomes full and a session that is not in the cache is accessed, the least recently used session is removed from the cache (but not from the database; the session is still valid until explicitly invalidated or timed out) to make room for the new entry.
This removal occurs whether or not overflow is enabled. However, under heavy-concurrent-access scenarios, multiple new sessions might compete for the space vacated by the single, least recently used entry.
When overflow is disabled, only one new session is placed in the cache; the others must be reread from the database. To optimize performance, the product does not retry to add the next new session by removing the next least recently used entry.
When overflow is enabled, one new session is added to the base table, and the rest reside in memory in the overflow table. Analysis and customer experience show that the size of this table remains relatively small compared to the base in-memory session pool size.
For more information on configuring session persistence, see Configure distributed sessions for session recovery support.