Session expiration and infinispan configuration – HP Integrity NonStop H-Series User Manual
Page 62

Table 16 Components of nsasj.xml (continued)
Description
Attribute
Element
Allows fine tuning of rehashing characteristics. The
numVirutalNodes
allows better distribution of data
among the nodes. Currently it is set to 4 for 2 real nodes.
numVirtualNode
hash
Number of cluster wide replicas for each cache entry. Set
to 2 to avoid single point of failure.
numOwners
Expiration and Eviction from Infinispan Cache servers
Expiration and Eviction refer to cleaning the cache of unused cache entries. The subsequent
paragraph describes the method and the elements involved in the cleaning of Infinispan Cache
servers of unused entries.
Expiration relies on setting time criteria for cache entries. Lifespan defines the duration to keep the
entries, and maxIdleTime defines the duration the entry is allowed to remain in cache when no
operation is performed on the entry.
Eviction, on the other hand, is based on the number of entries. MaxEntries defines the maximum
number of entries allowed in the cache, and the eviction strategy can be one of the least recently
use (LRU), low inter-reference recency set (LIRS) which is based on the history of the entry.
Both eviction and expiration are required to remove entries from the Infinispan Cache server. The
default configuration of NSASJ does not provide any eviction or expiration configuration. However,
the user may specify the same in their configuration based on their application needs.
describes the expiration and eviction attributes that can be set for named
caches.
Table 17 Components of Expiration and Eviction
Description
Attribute
Element
Controls the eviction settings for the cache
eviction
Maximum number of entries in a cache instance. Cache
size is guaranteed not to exceed upper limit specified by
maxEntries
maxEntries
. However, due to the nature of eviction it is
unlikely to be exactly the maximum number of entries
specified.
Defines the eviction strategy. Options are UNORDERED,
LRU, LIRS, and NONE (to disable eviction).
strategy
Controls the default expiration settings for entries in the
cache.
expiration
The maximum lifespan of a cache entry, after which the
entry is expired cluster wide, in milliseconds. -1 means the
lifespan
entries never expire. Typically this can be set to the same
value as the SessionTimeOut of the application.
Maximum idle time a cache entry is maintained in the
cache in milliseconds. If the idle time is exceeded, the entry
maxidle
is expired cluster wide. In a web session scenario, this
value can be the same as maxInactiveInterval of
the application.
Interval (in milliseconds) between subsequent runs to purge
expired entries from memory and any cache stores.
wakeUpInterval
Session expiration and Infinispan configuration
In a web application, when session-timeout is set in web.xml, it is assumed that the session entry
is removed. In case of NSASJ, the sessions are stored in the Infinispan Cache servers. To make
62
Configuring NSASJ