Sun Microsystems 820434310 Server User Manual


 
Session Persistence Scope
You can specify the scope of the persistence in addition to persistence frequency on the same
page in the Admin Console where you specify persistence frequency, Congurations >
cong-name > Availability Service (Web Container Availability).
For detailed description of dierent persistence scopes, see
Chapter 7, “Conguring High
Availability Session Persistence and Failover,” in Sun GlassFish Enterprise Server 2.1 High
Availability Administration Guide
.
Persistence scope can be one of:
session
modifed-session
modied-attribute
session
With the session persistence scope, the server writes the entire session data to
HADB—regardless of whether it has been modied. This mode ensures that the session data in
the backend store is always current, but it degrades performance, since all the session data is
persisted for every request.
modied-session
With the modied-session persistence scope, the server examines the state of the HTTP session.
If and only if the data has been modied, the server saves the session data to HADB. This mode
yields better performance than session mode, because calls to HADB to persist data occur only
when the session is modied.
modied-attribute
With the modied-attribute persistence scope, there are no cross-references for the attributes,
and the application uses setAttribute() and getAttribute() to manipulate HTTP session
data. Applications written this way can take advantage of this session scope behavior to obtain
better performance.
Session Size
It is critical to be aware of the impact of HTTP session size on performance. Performance has an
inverse relationship with the size of the session data that needs to be persisted. Session data is
stored in HADB in a serialized manner. There is an overhead in serializing the data and
inserting it as a BLOB and also deserializing it for retrieval.
Tests have shown that for a session size up to 24KB, performance remains unchanged. When
the session size exceeds 100KB, and the same back-end store is used for the same number of
connections, throughput drops by 90%.
TuningtheEnterprise ServerforHigh-Availability
SunGlassFishEnterpriseServer2.1PerformanceTuningGuide January2009118