-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
The shards allocator mostly does a good job of spreading the shards of each index out across the available nodes, but there are some corner cases where it might temporarily concentrate too many hot shards on a single node, leading to poor performance and possible resource exhaustion (#17213). It is occasionally useful to add the index.routing.allocation.total_shards_per_node constraint when indices are under heavy load, to prevent too many hot shards from being allocated to the same node. We are contemplating generalising this to a more nuanced set of per-index resource constraints too (#17213 (comment)).
If an index is managed by ILM then it is likely its resource requirements will change along with its lifecycle. In particular when the index leaves the hot phase it will no longer see such heavy indexing, and so any total_shards_per_node constraint is likely no longer necessary. It's important to keep the use of this sort of setting to a minimum to avoid over-constraining the allocator since this can lead to unassigned shards (#12273). I therefore think it'd be a good idea to allow this kind of setting to be changed in the appropriate ILM phase transitions.