coder
coder

Reputation: 393

ElasticSearch Cluster Replication

I have an Elasticsearch cluster of 3 nodes. Each node can become a master and data node. My Elasticsearch settings are:

index.number_of_shards: 8
index.number_of_replicas: 2
gateway.recover_after_nodes: 2
gateway.recover_after_time: 5m
gateway.expected_nodes: 3
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["host1", "host2:9200","host3:9200"]

My Cluster is up now and cluster health is green. But Shard allocation is like

Node1 - 0,1,2,3,4,6 where 6 is primary and other are replicas

Node2 - 5,6,7 all replicas

Node3 - 0,1,2,3,4,5,7 all primary

This structure shows only 1 replica copy of each shard split on nodes. But I mentioned 2 replicas in settings then it should show 2 replica copy of each shard.

Am I understanding it wrong or something is missing in settings.

Upvotes: 1

Views: 1386

Answers (1)

Andrei Stefan
Andrei Stefan

Reputation: 52368

index.number_of_replicas from elasticsearch.yml is for new indices. The ones you already have need to be adjusted manually: PUT /_all/_settings { "index": { "number_of_replicas": 2 } }

Also, do please consider upgrading. ES is now at version 2.3.1, 0.90 is very old.

Upvotes: 1

Related Questions