|Tools and Modules / HTTP Session Management Modules|
Decide which topology is best for your usage. The module configuration process is slightly different for each topology.
In a peer-to-peer configuration, each GemFire instance within an application server contains its own cache. It communicates with other GemFire instances as peers (rather than clients and servers). Depending on the way the GemFire data region is defined, data is either replicated across all GemFire peers or it is partitioned so that each instance's cache contains a portion of the entire data set. By default, data is replicated. A peer-to-peer configuration is useful when multiple systems want fast access to all session data. This configuration is also the simplest one to set up and does not require any external processes.
In a client/server configuration, the Tomcat or tc Server instance operates as a GemFire client, which must communicate with one or more GemFire servers to acquire session data. The client maintains its own local cache and will communicate with the server to satisfy cache misses. A client/server configuration is useful when you want to separate the application server instance from the cached session data. In this configuration, you can reduce the memory consumption of the application server since session data is stored in separate GemFire server processes.
With this configuration, distributed systems at different sites are loosely coupled through gateway system members (that is, gateway hubs). The distribution of session data between sites is seamless to the applications within each distributed system. If a system becomes unavailable, the rest of the cluster continues to operate. In a multi-site topology, each site has its own distinct distributed system. In each system, at least one member is chosen to act as a gateway that distributes data to and from the other sites. This configuration is useful when you are attempting to replicate session data across multiple sites, which can be valuable for handling complete site failovers. Load balancers such as SpringSource ERS can be configured with hot backups that access this remote HTTP session data.
Refer to Topologies and Communication for more information on GemFire topologies.