As far as I understand, shards in elasticsearch are distributed by an internal mechanism among all data nodes.
However,I have the following observations -
Is it the expected behavior?
The issue at hand is that I started out with just one node,5 shards and no replicas. The index contains about 100 GB of data . Now i want to add a new data node.
My questions -
Note - Cluster rerouting works fine .However, these questions will help me plan for future.
TIA
If you need to distribute shards right after you add a node, then you have to execute rerouting manually. Even though you don't run it manually, after time elasticsearch distributes your shards evenly.
There some configuration options you can use regarding shard rebalancing
in index settings
"index.routing.allocation.total_shards_per_node": 1
in `cluster settings
"transient":{
"cluster.routing.allocation.cluster_concurrent_rebalance": 1
}
Configuration parameters themselves explain what they exist for, you can modify values and see how they work for you.