InfoCenter Home > 7.1.6.1: HTTP sessions, servlets, and the session managerWhen an HTTP client interacts with a servlet, the state information associated with a series of client requests is represented as an HTTP session and identified by a session ID. The Session Manager is responsible for managing HTTP sessions, providing storage for session data, allocating session IDs, and tracking the session ID associated with each client request through the use of cookies or URL rewriting techniques. The Session Manager can store session-related information in memory in two ways:
Persistent sessions are essential for using HTTP sessions with a load distribution facility. When an application server receives a request associated with a session ID that it currently does not have in memory, it can obtain the required session state by accessing the session database. If persistent sessions are not enabled, an application server cannot access session information for HTTP requests that are sent to servers other than the one where the session was originally created. The Session Manager implements caching optimizations to minimize the overhead of accessing the session database, especially when consecutive requests are routed to the same application server. Storing session states in a persistent database also provides a degree of fault tolerance. If an application server goes offline, the state of its current sessions is still available in the session database. This enables other application servers to continue processing subsequent client requests associated with that session. Saving session state to a database does not completely guarantee that it is preserved in case of a server failure. For example, if a server fails while it is modifying the state of a session, some information is lost and subsequent processing using that session can be affected. However, this situation represents only a very small period of time when there is a risk of losing session information. The drawback to saving session state in a persistent database is that accessing the session state database can use valuable system resources. The Session Manager can improve system performance by caching the database data at the server level. Multiple consecutive requests that are directed to the same server can find the required state data in the cache, reducing the number of times that the actual session state database must be accessed (and thus the overhead associated with database access). |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|