How to assign correctly shards when a new node join cluster?

Hi,
this is my current scenario:
9 DATA nodes
A lot of indices (avg size 5 GB and 3 shards and 2 replica)
1 big index (100 GB size and 12 shards and 3 replica)

When a new DATA node joins the cluster, Elasticsearch will give to it a lot of shards; in a specific way, to reduce the gap of disk space and number of shards, it will assign almost 12 shards of my biggest index to this new node.
Unfortunately, that index is the most used by my system so when this happens, my cluster will suffering of bad performance. For sure, when the balancing procedure is completed, my new DATA node will release some shards to the other nodes but this 2-steps will takes a lot of time.

Is there a way to say to Elastic to assign not all the shards to the new node but only 3 (since my total number is 12)? Or something similar....

You could use disk-based shard allocation to reduce the amount of data/shards that gets relocated. You could use index-level shard allocation filtering to keep the big index's shards off of the new nodes.

Not really sure about allocation filtering. If a node loses network connectivity I cannot know before which one will be. I saw that I can also specify priority for each index.

Yes, there's a setting for that: Total shards per node | Elasticsearch Guide [8.11] | Elastic

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.