-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Query prioritisation support #1017
Comments
I was having a discussion about this literally just today. Thanks for this @Bukhtawar |
Throwing some additional thoughts and copying details from #1140 and closing it, since this was created first. As part of #1042 we are planning to do resource mapping of queries, and selective rejection when in duress. We want to extend the solution to also allow query prioritisation, which provides mechanism to selectively execute queries, when there are multiple queries with different priorities contending for the same resources. Not all queries in the workload are of equal importance to customer. Often performance of one request or set of queries might be more important than others. With query prioritisation, customers can define the relative importance of queries in a workload by setting a priority value. The priority is specified for a dynamic queue such as one of (CRITICAL, HIGHEST, HIGH, NORMAL, LOW, LOWEST). Opensearch will use the priority when accepting queries for execution, and to determine the amount of resources to be allocated to a query. By default, queries run with their priority set to NORMAL. These priority of query is also used under duress, to selectively cancel resource guzzling queries, and recover the system. |
I wanted to capture a practical use case for this feature in the company I work at. We have three main sources of load to OpenSearch:
Ideally if OpenSearch was under stress (particularly on specific data nodes), it would be able to first load shed the background jobs before it starts to load shed live user queries. This could be done outside of OpenSearch, but either the backpressure would be too crude, creating failing requests which would have executed just fine as the target data node/shard was not under stress but others were, or requires complex logic to track which shards and data node a request will map to and use external monitoring to determine if that shard/data node is under stress. The OpenSearch cluster itself is much better suited to be able to determine what shards are overloaded, provided it knows what requests are more or less important. |
Problem
We lack a prioritisation mechanism for queries for instance
The text was updated successfully, but these errors were encountered: