Skip to content

Implement Resource Based Throttling on Querier#7442

Open
eeldaly wants to merge 4 commits intocortexproject:masterfrom
eeldaly:query-rbt
Open

Implement Resource Based Throttling on Querier#7442
eeldaly wants to merge 4 commits intocortexproject:masterfrom
eeldaly:query-rbt

Conversation

@eeldaly
Copy link
Copy Markdown
Contributor

@eeldaly eeldaly commented Apr 20, 2026

What this PR does: This PR implements the already built resource based throttling (#6674) to querier pods to allow for query rejection based on resource utilization.

Query Protection flags are the same as current with querier prefix:
-querier.query-protection.rejection.threshold.cpu-utilization=0.5 (0-1) (0 default)
-querier.query-protection.rejection.threshold.heap-utilization=0.5 (0-1) (0 default)

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

Signed-off-by: Essam Eldaly <eeldaly@amazon.com>
eeldaly added 2 commits April 20, 2026 16:05
Signed-off-by: Essam Eldaly <eeldaly@amazon.com>
Signed-off-by: Essam Eldaly <eeldaly@amazon.com>
Copy link
Copy Markdown
Member

@friedrichg friedrichg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
We probably need a cortex_querier_rejected_requests_total metric. right?

Comment thread docs/blocks-storage/querier.md Outdated
query_protection:
rejection:
threshold:
# EXPERIMENTAL: Max CPU utilization that this ingester can reach before
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# EXPERIMENTAL: Max CPU utilization that this ingester can reach before
# EXPERIMENTAL: Max CPU utilization that this instance can reach before

query_protection:
rejection:
threshold:
# EXPERIMENTAL: Max CPU utilization that this ingester can reach before
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# EXPERIMENTAL: Max CPU utilization that this ingester can reach before
# EXPERIMENTAL: Max CPU utilization that this instance can reach before

Comment thread schemas/cortex-config-schema.json Outdated
"properties": {
"cpu_utilization": {
"default": 0,
"description": "EXPERIMENTAL: Max CPU utilization that this ingester can reach before rejecting new query request (across all tenants) in percentage, between 0 and 1. monitored_resources config must include the resource type. 0 to disable.",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "EXPERIMENTAL: Max CPU utilization that this ingester can reach before rejecting new query request (across all tenants) in percentage, between 0 and 1. monitored_resources config must include the resource type. 0 to disable.",
"description": "EXPERIMENTAL: Max CPU utilization that this instance can reach before rejecting new query request (across all tenants) in percentage, between 0 and 1. monitored_resources config must include the resource type. 0 to disable.",

Signed-off-by: Essam Eldaly <eeldaly@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants