Sun Microsystems 820434310 manual Session Persistence Scope, Session Size, modified-session

Models: 820434310

1 128
Download 128 pages 34.03 Kb
Page 118
Image 118
Session Persistence Scope

Tuning the Enterprise Server for High-Availability

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, Configurations > config-name> Availability Service (Web Container Availability).

For detailed description of different persistence scopes, see Chapter 7, “Configuring 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

modified-attribute

session

With the session persistence scope, the server writes the entire session data to HADB—regardless of whether it has been modified. 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.

modified-session

With the modified-session persistence scope, the server examines the state of the HTTP session. If and only if the data has been modified, 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 modified.

modified-attribute

With the modified-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%.

118

Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide • January 2009

Page 118
Image 118
Sun Microsystems 820434310 manual Session Persistence Scope, Session Size, modified-session, modified-attribute