Session failover inside the plug-in
If the server that contains the session is not available to the plug-in when it forwards the request, then the user will not be able to continue the session. To overcome this problem, it is possible to create a persistent store for the session information. This means that if a server is unavailable, the plug-in can route the request to an alternate server as illustrated in Figure 5-11. The alternate server can then retrieve the session information from the persistent store.
There are two mechanisms to configure session persistence in WAS V5.1:
- Database persistence
Session state is persisted to a database shared between the clustered appservers. This feature was the only session persistence mechanism provided by earlier versions of WAS.
- Memory-to-memory replication, also known as WebSphere Internal Messaging
This is a new feature provided since WebSphere 5.0. It provides in-memory replication of session state between clustered appservers.
Figure 5-12 Session management sample topology
Using Figure 5-12, the steps involved using our sample topology are:
- The plug-in processes a request from user A to http://yourWebServer/snoop. The request also contains a JSESSION cookie with a session ID and CloneID of v544d031.
- Plug-in matches the virtual host and URI to PluginCluster.
- The plug-in then checks for session affinity and finds the CloneID of v544d031 in the requests JSESSION cookie.
- It then searches for the CloneID of v544d031 in the plug-cfg.xml's list of primary servers and matches the CloneID to PluginMember1.
- The plug-in will then check to see if PluginMember1 has been marked down. In our case it has not been marked down.
- It will then attempt to get a stream to PluginMember1. Finding the server is not responding, PluginMember1 is marked as down and the retry timer is started.
- The plug-in then checks the session identifier again.
- It then checks the servers. When it reaches PluginMember1, it finds it is marked down and the retry timer is not 0, so it skips PluginMember1 and checks the next cluster member in the primary list.
- PluginMember2 (CloneID v544d0o0) is selected and the plug-in attempts to get a stream to it. The plug-in either opens a stream or gets an existing one from the queue.
- The request is sent and received successfully to PluginMember2 and sent back to user A.
Prev | Home | Next WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.