Tip - WebSphere Clustered Environment - Session Persistence and Java Serialization
Joined: Mar 05, 2002
The default WebSphere installation stores session data in memory. If there are several WebSphere servers in the cluster and one of them goes down then the user session data is lost. For example in a shopping cart application it's a highly likely that the application will store session data in a session object in the local JVM. If that WebSphere server goes down then IHS routes the next request from the user which contains the session ID to another WebSphere Server in the cluster. That server searches it's JVM for the user session but won't find it and the application bombs out. Users don't like this especially if they have just entered their credit card details! In a clustered environment with session persistence enabled the session data from all WebSphere servers is stored in a central DB2 database. If a WebSphere box goes down the request is redirected to another WebSphere server which initially searches it's session cache for the session object which in this case it won't find and then searches the DB2 database where it will find the session object and then the application can handle the request. The big fly in the ointment is that developers do not ensure that all the data in the session object is java i-o serialization and since they usually work off a single WebSphere instance they never have to worry about handling re-directed requests. So the application works fine in development but dies in production.
Joined: Sep 24, 2002
The drawback to WebSphere persisting session information to the DB is that every update to a session object _must_ make a round-trip to the DB. This causes a huge performance hit. Take a look at Tangosol's Coherence In-Memory Clustered Caching product which provides a HTTP Session replication module for Websphere 4.0 which replicates the session data across the "cluster" allowing the use of non-sticky loadbalancing.
<a href="http://www.tangosol.com" target="_blank" rel="nofollow">www.tangosol.com</a><br /><a href="http://www.tangosol.com/coherence.jsp" target="_blank" rel="nofollow">Coherence:</a> Easily share live data across a cluster!