The client needed assistance in setting up Cross-Cluster Replication (CCR) between two Elasticsearch clusters running in a Windows environment to ensure reliable data synchronization and high availability.
Before implementation, we conducted a comprehensive review of the client's environment to ensure compatibility and readiness for Cross-Cluster Replication.
A systematic approach to ensure reliable Cross-Cluster Replication setup across both environments.
Essential prerequisites and initial setup steps to prepare both clusters for CCR implementation.
Configure both Elasticsearch clusters with proper settings to enable Cross-Cluster Replication.
cluster.name: leader-cluster node.name: leader-node network.host: 0.0.0.0 http.port: 9200 discovery.seed_hosts: [] cluster.initial_master_nodes: ["leader-node"]
cluster.name: follower-cluster node.name: follower-node network.host: 0.0.0.0 http.port: 9200 discovery.seed_hosts: [] cluster.initial_master_nodes: ["follower-node"]
PUT /_cluster/settings
{
"persistent": {
"cluster.remote.leader-cluster.mode": "proxy",
"cluster.remote.leader-cluster.proxy_address": "LEADER_CLUSTER_IP:9300",
"cluster.remote.leader-cluster.skip_unavailable": true
}
}
Create the source index on the Leader cluster and configure the Follower to replicate it.
PUT /leader-index
{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
}
}
POST /leader-index/_doc
{
"field1": "value1",
"field2": "value2"
}
PUT /follower-index/_ccr/follow
{
"remote_cluster": "leader-cluster",
"leader_index": "leader-index"
}
Validate that Cross-Cluster Replication is working correctly by testing data synchronization.
POST /leader-index/_doc
{
"field1": "new_value",
"field2": "additional_data"
}
GET /follower-index/_search
Implement continuous monitoring to ensure CCR remains healthy and performs optimally.
The client received a comprehensive, step-by-step approach to correctly set up Cross-Cluster Replication in their Windows environment, ensuring reliable data synchronization between both Elasticsearch clusters.