New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates causing hotspots in cluster when multiple primary shards for an index exist on a single node #8149
Comments
@ppf2 The It seems like the I'd prefer to keep the number of options small, as the more you add, the more difficult it is to reason about the outcome. |
@ppf2 so it looks like So there is no doubt that this heuristic needs improvement. But the Part of the problem is that the rebalancing algorithm is a bit of a black box. I've opened #8170 to see if we can improve that situation. |
Thanks @clintongormley. Agree that total* setting if not used properly can cause primary shards not to be fully allocated. Would be nice to provide some way (not necessarily the total* setting) in the future to balance primary shards per index per node, something that's more automatic without having to manually reroute/move the shards around. |
There are several reasons why I think we need to solve this problem differently. The problem here is really not the balance function or anything in that code it's the fact that updates put extra pressure on the primary shard and therefore don't scale very well. I am against a setting like this because it can bring your cluster in a very bad state where it can potentially not allocate a primary at all, or we need to move a shard from one node to another to make space for a primary which is the wrong thing to do. Being a primary is only a boolean flag really and flipping it in order to make another healthy replica a primary should be simple and IMO is the way to go. It might be part of the balancing algorithm but not via an allocation decider or anything along those lines. The problem here is really the update feature and not the balancing algorithm. |
See #8369 |
removing the discuss tag since we are all on the same page here and we have #8369 |
Closing in favour of #8369 |
Some of our end users are seeing "hotspots" in the cluster when multiple primary shards for an index are allocated to a single node (unbalanced primary shards). This becomes an issue when there are a lot of updates where the documents are loaded onto the primary shards first. The http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-update-settings.html#_balanced_shards weight settings do not always help and require re-tuning when new nodes or new shards are added. It will be nice to provide a setting similar to http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-allocation.html#_total_shards_per_node , but only applies to primary shards, like total_primary_shards_per_node which allows the end user to define the maximum # of primary shards an index can have on a single node. This will ensure that multiple primary shards are not allocated to the same node.
The text was updated successfully, but these errors were encountered: