Lee. YunSu
Lee. YunSu

Reputation: 436

Is the existing data re-replication when changing the replication coefficient of Elastic Search?

I use Elasticsearch cluster of 4 node (ver 1.5)

And my default replica number is 1 (set /etc/elasticsearch/elasticsearch.yml)

So my indexes replica set(num_of_replicas) is 1

Because replica set is 1, when more than 2 faults occur which node failed, data is lossed

Therefore I want that change more than 2 of set of replica.

If change the replication set of Elastic Search using this command, is exist data re-replication?

    curl -XPUT 'http://localhost:9200/awslog/_settings' -d 
    '{"index":{"number_of_replicas" : 5}}'

Upvotes: 0

Views: 59

Answers (1)

alr
alr

Reputation: 1804

Note, that you cannot change the number of replicas to 5 in a four node cluster, the maximum number would be 3 (three copies of the data plus one primary shard).

If you change the number of shards, Elasticsearch will automatically start rebalancing the data and ensure the current setup matches the configuration - I assume that this was your question, I may have misheard it though.

Upvotes: 1

Related Questions