8.5.8 Configure distributed session management
WAS V6 supports distributed session management in two ways:
Database session persistence, where sessions are stored in a defined database. Memory-to-memory session replication, where sessions are replicated to one or more appserver instances. See Session persistence considerations and Plug-in workload management and failover.
For our sample topology, we decided to use memory-to-memory replication. The following section shows you how to configure this function.
When creating our WEBcluster, we also created a replication domain. Thus, the first thing to do is to verify that the replication domain has indeed been created:
- Log on to the WAS console and select...
Environment | Replication domainsYou should see the replication domain WEBcluster in the list.
- Click the WEBcluster replication domain. The replication domain configuration properties appear
![]()
- The default setting is ok for us, a single replica for each HTTP session, so nothing needs to be changed.
If you did not create the replication domain along with the cluster, you can create a new one now.
The following instructions need to be repeated for each appserver in the WEBcluster (Web1, Web2a, and Web2b).
Normally IBM recommends that you create a single member first, configure it further and only then create the additional cluster members so that these will have the same settings. In our case, that approach would have avoided the task to change the three different members individually.
- Use the WAS console, select...
Servers | Application servers | Web1 | Web Container Settings | select Session management | Additional Properties | Distributed environment settings![]()
- Check the "Memory-to-memory replication" radio button. This automatically opens the next panel where additional settings can be configured.
![]()
- Select WEBcluster as the Replication domain and ensure the Replication mode is set to Both client and server.
Click Apply.
In a cluster whose members have enabled memory-to-memory session replication, sessions are replicated to other servers in the cluster that participate in the same replication domain. There can be as many session replicas as you want, the default being a single replica for each session.
When the Single replica option is chosen, one single server in the replication domain is selected during session creation, and all updates to the session are only replicated to that single server.
If the Entire Domain option is chosen each appserver will replicate session data to all other replication domain members - this should be regarded as the most robust choice for memory-to-memory replication. However, performance could be affected by this (if you have many appservers) and you should consider this choice carefully. Using fewer replicas (you can specify the number of replicas in the replication domain) or database persistence might be the better choice for your production environment.
- Click the Distributed Environment Settings link at the top of the window and select Custom tuning parameters (under Additional Properties).
- Select Low (optimize for failover) as the Tuning level and click Apply. This ensures an update of all session data of a particular session before the servlet engine finishes its request.
![]()
- Click Save to save the changes to the master configuration.
- Repeat step 1 to step 8 for all other cluster members.
In case you did not create all cluster members at cluster creation time (Creating the Web container cluster) but chose to use the...
Configure one member | change it | add additional members...approach, now go back to your cluster configuration and add Web2a and Web2b using Web1 as the server template.