I am looking for a way to automatically distribute Elasticsearch's primary shards among the newly added data nodes.
I know a way to achieve this is by re-indexing after the new nodes are added. Is there any internal configuration or other simpler way by which it can be done automatically once the cluster configurations are altered?
Example Scenario
Initially, the cluster has 3 data nodes and an index with 6 primary shards and 5 replicas. So Elasticsearch distributes 2 primary shards among each node. I increased the number of data node to 6 after a while. The 3 new nodes automatically share the unassigned replicas but not primary shards. Is there a way to achieve this without re-indexing?
Primary and replica shard in most cases do the same amount of work so why does it matter? Elasticsearch manages promotion of shards to primary so it can change at any time even if you manage to get it assigned the way you want.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.