LocalSessionStoreServlet
The LocalSessionStoreServlet is responsible for storing session information in a local session store or cache, within the context of the Dynamic Session Engine. The LocalSessionStoreServlet is optimized for good performance. See also: Appendix C - Performance Samples.
You can only use the LocalSessionStoreServlet in combination with the SessionManagementFilter. The SessionManagementFilter defines the method of session binding (e.g., by means of cookies) and creates as well as handles the session. The LocalSessionStoreServlet loads and stores session data in the local store (e.g., shared memory).
A newly created LocalSessionStoreServlet instance is saved into a global hash table at proxy instance level, and identified by its name. If later another LocalSessionStoreServlet is defined with the same name, the system will use the existing servlet from the global hash table, instead of instantiating a new one, even if the new LocalSessionStoreServletwas defined in the context of a different virtual host (but the same proxy instance). In such cases, the size of the memory is determined by the firstly instantiated LocalSessionStoreServlet, based on the parameter MemorySize. This mechanism allows sharing sessions between different SessionManagementFilters, even within different virtual hosts of a proxy instance. In this case, choose the corresponding parameters of the servlet accordingly, for example, an increased memory size for a shared LocalSessionStoreServlet. If session sharing is not needed, use unique names for the LocalSessionStoreServlet instances.
Classname:
ch::nevis::nevisproxy::servlet::cache::local::LocalSessionStoreServlet
Library:
libLocalSessionStoreServlets.so.1
Configuration
MemorySize
- Type: integer
- Usage Constraints: required
Defines the number of bytes available in the store for local session storage. Maximum: 4294973847 bytes, which is ca. 4 GB. - If 90% of the memory is used, an ERROR will be traced and no new session can be created anymore. - If 95% of the memory is used, an ERROR will be traced and no session can be modified anymore. More informationFor more information about this parameter, see the chapter MemorySize Considerations.
NumMutexes
- Type: integer
- Usage Constraints: optional, advanced
- Default: min: 1, max: 10000, default: 1000
With the help of mutexes, it is possible to reduce the risk of unintended session overwrites. This parameter sets the maximum number of mutexes to use.
MaxLifetime
- Type: integer
- Usage Constraints: required
Sets the maximum lifetime of a new session in the session store.
MaxInactiveInterval
- Type: integer
- Usage Constraints: required
Sets the maximum inactive time interval (in seconds) of a new session in the session store. Note that this parameter can be overridden in the SessionManagementFilter to allow fine-tuning of session creations.
ReaperTimeOut
- Type: integer
- Usage Constraints: required
- Default: min: 1, max: 86400, default: 120
If the session reaper needs more time in seconds than defined for one run, an error event LC01 will be traced, as this is taken as an indication that there are serious performance issues with the session store.