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 oneMap
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.
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
toMERKLE_TREES
in theWanReplication
resource. -
Create the
WanSync
resource. The createdWanSync
automatically uses Delta WAN Synchronization.
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