This site hosts historical documentation. Visit www.terracotta.org for recent product information.

BigMemory WAN Replication Service

Introduction

BigMemory WAN Replication reliably replicates data on a per-cache basis across two or more regions connected by wide area networks. This allows geographically remote data centers to maintain eventually views of data. With BigMemory reliability and predictability, WAN replication ensures business continuity and can be used as part of a disaster recovery plan.

BigMemory WAN Replication integrates with your application so that caches marked for WAN replication are automatically synchronized across the WAN link. The service includes:

  • Fault tolerance
  • Scaling (both at the local cluster and in number of WAN-linked clusters)
  • Support for multiple toplogies
  • Operational simplicity

Concepts and Architecture

BigMemory WAN Replication uses regional Orchestrators to manage data replication.

Region — A data center, typically geographically distinct and connected to other regions with a high-speed link. A region holds one or more Terracotta Server Arrays (TSAs), and it can support multiple Orchestrators.

Orchestrator — The process that coordinates communication among regions and replicates cache modifications to all regions. Orchestrators can manage multiple caches.

Region-Orchestrator Example

In the figure below, each application has access to BigMemory data held in its TSA. Each Orchestrator communicates with the TSA in its region, as well as with the Orchestrators in other regions, in order to allow data to become eventually consistent across all regions.

Region-Orchestrator 1

Figure 1. WAN Replication Topology

Master and Replica Caches

The Orchestrators manage replication through designated Master and Replica instances of each cache.

Master Cache — The cache that serves as the authoritative data set against which its Replica caches are synchronized. Each replicated cache will have one active Master at a time.

Replica Cache — A cache mirror that receives replication updates from the Master cache. A Replica cache becomes active only after it fully synchronizes with the Master cache.

Master-Replica Deployment

Master and Replica caches can be arranged in two basic deployments: master-region or combination-region.

Master-Region

The master-region deployment may be used to keep all Master caches in a single region. This arrangement is effective when a single application is using WAN replication, or when the Replica region is used as the backup location for disaster recovery.

The figure below shows Caches A, B, and C mastered in Region 1. Regions 2 and 3 are replicas of all caches.

Master-Replica 2

Figure 2. Master-Region Deployment

Combination-Region

The combination-region deployment may be used when Master caches are not confined to a particular region. This arrangement is effective for geographically distributed applications that concurrently use BigMemory data, with each Master cache located in the region where its application is most active.

The Orchestrator can manage non-overlapping Master and Replica caches at the same time. This means that one region may be mastering one set of caches while replicating another set of caches.

The figure below shows Cache A mastered in Region 1, and Caches B and C mastered in Region 2. Region 3 is a replica of all caches.

Master-Replica 3

Figure 3. Combination-Region Deployment

Replication Modes

The BigMemory WAN Replication Service offers two replication modes: Unidirectional and Bidirectional. Unidirectional mode replicates data in one direction only, from Master to Replica, and is used for active-passive deployments such as disaster recovery. Bidirectional mode replicates data in two directions, from Master to Replica and from Replica to Master, and is used for active-active deployments where updates from more than one region should be incorporated into the Master cache's authoritative data set.

The table below summarizes the two modes:

Unidirectional Replication Bidirectional Replication
Active-Passive Active-Active
The Master cache replicates cache element modifications to the Replica caches Both Master and Replica caches replicate cache element modifications
Replica caches operate locally but do not replicate cache element modifications The Master cache receives replications from the Replica caches
The Master cache maintains the authoritative data set but no element tracking is necessary The Master cache tracks each cache element and maintains the authoritative data set
No conflict resolution necessary Conflict resolution (localized updates recommended)
Example use case: disaster recovery Example use case: regional operations

The default mode is Unidirectional. To switch to Bidirectional mode, refer to Orchestrator Configuration Parameters. For more information about Bidirectional mode and conflict resolution, refer to the Bidirectional WAN Replication page.