-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[AdmissionControl] Using threadcontext to collect resource usage stats #11213
Comments
I would say lets have Rest looks good ! Nice work. Will be great to see PR. |
When used with security plugin , the response headers gets reset as part of stash - we might have to add custom logic in stash to not reset 'Resource_usage_stats' field in response headers , instead initialize the newly created threadcontext with them. |
@ansjcy -- Do you think this would be superseded by the work you're doing on Query Insights, like #13172? @bharath-techie -- how much overlap is there between this PR and your proposal here? |
@msfroh Actually the proposed solution to store stats as part of ResponseHeaders in ThreadContext is exactly how we get query-level resource usage metrics on the coordinator node in #13172 :) After the shard search responses are sent to the coordinator node, we gather the resource usage for all nodes into |
#13172 certainly seems like a working solution for threadcontext based resource usage transmission from data nodes to coordinator ndoes. In this proposal , we explored sending node level resource usage stats as part of search and indexing phases.
Tagging @Bukhtawar @ajaymovva as well to check if they have anything to add. |
Overview
The parent RFC #8910 discusses admission control framework which uses resource usage stats of the peer data nodes in the coordinator to help in ranking / rejection in coordinator node.
We proposed using Threadcontext to carry resource usage / health stats of the downstream nodes to the coordinator. ( As part of response headers )
This document covers the low level design / implementation details of the usage of threadcontext for the same.
Low level design
Storing stats as part of ResponseHeaders in ThreadContext
Retrieving stats from response headers
We will check if the incoming request has resource usage stats in thread context response headers and we’ll add to the collector in coordinator.
Format of Data stored in Response headers of ThreadContext
Resource usage stats is stored as a 'string' in the response headers of the threadcontext. Format of the string should follow these key principles:
Format :
The text was updated successfully, but these errors were encountered: