Every administrator knows that a valid backup is a requirement of modern-day systems, but a backup can be used for more than just data restoration.  In a typical environment, backups are used in an active-passive configuration, allowing access to a system that may be made active in the result that the current environment goes down; however, these may also be used in an active-active configuration, allowing multiple environments to utilize the same dataset.

JBoss Data Grid’s cross-datacenter replication may be used to create data backups in multiple clusters, allowing data redundancy should one location be unavailable.  In addition to providing an up-to-date backup, replicating a cache to a second cluster allows clusters in multiple locations to be used in active-active mode to handle sessions.

Consider the following scenario:

In the above example, we have Enterprise Web Server (EWS) instances running in a cloud, proxying requests to two backends, one located in New York and the second in San Francisco.  Each backend contains a JBoss Enterprise Application Platform (EAP) cluster that externalizes its sessions into the JBoss Data Grid (JDG) cluster.  The JDG clusters from New York and San Francisco are using cross-datacenter replication, allowing them to transfer sessions between the two clusters.

Consider a scenario where an incoming request is routed to the New York environment, handled by the EAP cluster in that location, and then externalized to JDG.  Before the session is terminated, the New York center becomes unavailable, whether due to an outage or the EAP nodes receiving too many sessions.  Now requests may be failed over to the San Francisco environment seamlessly, because sessions have been externalized to the backing JDG cluster, and these JDG clusters are communicating across location.

Full instructions on enabling Cross-Datacenter Replication are found in the JBoss Data Grid Administration and Configuration Guide and the Developer Guide.