A newer version of Hazelcast Operator is available.

View latest

Syncronizing WAN replicated data

WAN Syncronization allows you to overcome out-of-sync issues with the WAN replicated data.

See Synchronizing WAN Clusters for more detailed information about the configuration and behavior of WAN replication in Hazelcast.

Prerequisites for WAN Sync

Before you create and configure a WanSync resource, you must create the following:

  • At least one Hazelcast resource and one Map resource for the source Hazelcast cluster.

  • A target Hazelcast cluster that is accessible from the source cluster.

  • A WanReplication CR that points to the target cluster.

Configuring the WanSync Resource

To configure WAN Syncronization, you must create WanSync resource. For more detailed information, see the API Reference.

To create WanSync resource you must use the existing WanReplication CR. This means that the WanSync reuses the existing and running WAN replication process.

Example of WanSync using the existing WanReplication
apiVersion: hazelcast.com/v1alpha1
kind: WanSync
metadata:
  name: wansync-sample
spec:
  wanReplicationResourceName: wan-replication-sample

Configuring Delta WanSync

To configure Delta WAN Sync for the Hazelcast cluster, do the following:

  • Configure Merkle Tree for the Map resource.

  • Set synConsistencyCheckStrategy to MERKLE_TREES in the WanReplication resource.

  • Create the WanSync resource. The created WanSync automatically uses Delta WAN Synchronization.

Example of Delta WanSync
apiVersion: hazelcast.com/v1alpha1
kind: Map
metadata:
  name: map-sample
spec:
  hazelcastResourceName: hazelcast
  merkleTree:
    depth: 10
---
apiVersion: hazelcast.com/v1alpha1
kind: WanReplication
metadata:
  name: wan-replication-sample
spec:
  resources:
  - name: map-sample
    kind: Map
  targetClusterName: dev
  endpoints: "35.192.33.252"
  synConsistencyCheckStrategy: "MERKLE_TREES"
---
apiVersion: hazelcast.com/v1alpha1
kind: WanSync
metadata:
  name: wansync-sample
spec:
  wanReplicationResourceName: wan-replication-sample

Checking the Status of a WAN Sync

After creating the WanSync resource, run the following command to see the WAN syncronization status:

kubectl get wansync wansync-sample

The output is similar to the following:

NAME                     STATUS
wansync-sample-sample    Completed