Memory-to-memory replication

 

WAS supports session replication to another appserver instance. This support is referred to as memory-to-memory session replication. In this mode, sessions can be replicated to one or more WAS instances to address a single-point of failure (SPOF).

The WAS instance in which the session is currently processed is referred to as the owner of the session. In a clustered environment, session affinity in the WAS plug-in routes the requests for a given session to the same server. If the current owner server instance of the session fails, then the WAS plug-in will route the requests to the another appropriate server in the cluster. This server either retrieves the session from a server that has the backup copy of the session or it retrieves the session from its own backup copy store, and the session resides there. The server now becomes the owner of the session and affinity is now maintained to this server.

A WAS instance can be set up to only broadcast or send out copies of the sessions it owns (and doesn't receive back up copies of session from other servers) or only store backups of other WAS sessions (and doesn't send out copies of any session created in that particular server). One can also set up a WAS instance so that it can serve servlets and simultaneously act as a backup store for sessions owned by other WAS instances. This storage option is controlled by the mode parameter. When configuring the Session Management facility for memory-to-memory replication, you can choose Session Management can Server mode, Client Mode, or Both. The default is Both.

In Server mode, the Session Management facility acts as a backup store for sessions owned by other WAS instances. In Client mode, the Session Management facility publishes the session to other WAS instances and retrieves the session from other WAS instances when the session is not in local memory. In Both mode, the Session Management facility acts as a backup store for sessions owned by other servers and also publishes owned sessions to other WAS instances.

When a session is created or updated in a WAS instance, the session leverages one of the replicator entries under the replication domain that is configured with the Session Management facility. This session gets replicated to the WAS instances that also connect to the same replicator domain and are acting either in Server or Both mode (in other words, they are not just replicated "clients").

In a cluster, by default, sessions are replicated in all the servers in the cluster that are connected to the same replicator domain. This replication can be redundant if there are large number of servers in a cluster. The Session Management facility has an option to partition the servers into groups when storing sessions. One can view the Replicator as having n partitions. The default is 10 partitions. By default the Session Management facility running in Server mode listens to all the partitions on the replicator. When a session is created in this facility, it is written to one of the partitions on the replicator. A partition is selected using mod of ten on number of sessions created (that is, number of sessions created mod 10). One can configure the Session Management facility on each server to listen to only certain partitions. In a cluster environment having large number of servers, some servers can be configured to listen on some partitions and others on a different partitions. Note that all the servers are still logically linked together through the replicator domain and you can retrieve a session in any server in the cluster. The size of the replication domain is set under "manage internal replication" in the Environment tab. Configure which groups and partitions a specific Session Management facility listens to under Session Management. There is also an option to replicate the session to only one other server (the single replica option under "manage internal replication"). When this option is chosen, the 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.


Replication
Replicating data
Configure for memory to memory replication