Skip to content
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

Add a guardrail to limit maximum number of shard on the cluster #6050

Closed
RS146BIJAY opened this issue Jan 27, 2023 · 2 comments
Closed

Add a guardrail to limit maximum number of shard on the cluster #6050

RS146BIJAY opened this issue Jan 27, 2023 · 2 comments
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request

Comments

@RS146BIJAY
Copy link
Contributor

RS146BIJAY commented Jan 27, 2023

Is your feature request related to a problem? Please describe.
We have observed that as shard count on the cluster increases, it becomes more prone to instability and availability. We have observed multiple instances where Cx had issues in the past because of too many shards on their cluster.

Describe alternatives you've considered
As of now, OpenSearch allows us to restrict the number of shards per node using setting cluster.max_shards_per_node inside ShardLimitValidator. The maximum number of shards that can be present on the cluster is determined by maxShardsPerNode * nodeCount. Issue here is, we can increase this total shard limit on the cluster just by increasing the number of node. There is no way we can control the maximum number of shards on an entire cluster.

Describe the solution you'd like
I would suggest to add a similar setting inside ShardLimitValidator which will control the maximum number of shards that can be present on a cluster. If the total number of shards exceeds this threshold, ShardLimitValidator will block any operation which creates new shards. The threshold value will be an optional configurable cluster setting, which Cx can set dynamically.

Considerations

  • Should we have some upper cap on this threshold value.
@anasalkouz
Copy link
Member

Closing this since PR already merged

@anasalkouz
Copy link
Member

@RS146BIJAY Do you think we should to have some smart defaults for newly created clusters based on HW specs, index size ...etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request
Projects
None yet
Development

No branches or pull requests

3 participants