Add proposals for client-identity rate limiting (write and query paths)#7681
Open
krunaljain wants to merge 1 commit into
Open
Add proposals for client-identity rate limiting (write and query paths)#7681krunaljain wants to merge 1 commit into
krunaljain wants to merge 1 commit into
Conversation
Cortex's ingestion and query rate limits are enforced at the tenant level only. When multiple independent services or teams share a tenant, one noisy or misbehaving client can exhaust the whole tenant's budget for everyone else, and there is no way to distinguish who, within a tenant, is responsible. Adds two companion design proposals: - client-identity-rate-limiting.md: write-path (distributor) enforcement, keyed on a new trusted X-User-ID header, following the same trust model Cortex already uses for X-Scope-OrgID. - client-identity-query-rate-limiting.md: the read-path (query-frontend) follow-on, reusing the same header and identity approach. Both are opt-in, additive to existing limits, and covered as experimental features on the proposed rollout plan. Signed-off-by: Krunal Jain <kjain25@apple.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Adds two companion design proposals to
docs/proposals/:client-identity-rate-limiting.md: proposes a second, optional rate-limiting dimension below the tenant on the write (ingestion) path, keyed on a new trustedX-User-IDheader, following the same trust model Cortex already uses forX-Scope-OrgID.client-identity-query-rate-limiting.md: a companion follow-on applying the same identity mechanism to query-frontend rate limiting on the read path.Motivation
Cortex enforces ingestion and query limits at the tenant level only. In practice a single tenant is often shared by multiple independent services or teams, and today's limiters cannot distinguish a well-behaved writer/querier from a noisy or misbehaving one sharing the same
X-Scope-OrgID. These proposals add an opt-in, additive mechanism to throttle by client identity below the tenant, without changing existing tenant-level behavior for anyone who doesn't configure it.Both proposals are:
Design highlights
X-User-IDheader, trusted the same way Cortex already trustsX-Scope-OrgID(i.e. no new authentication mechanism is introduced).Status
Both are filed as proposals for discussion (
Status: Proposed). No code changes are included in this PR; implementation would follow as separate PRs once the design is reviewed.Checklist