Add Nexus tenant rate-limit interceptor interface with no-op default#11012
Draft
prathyushpv wants to merge 1 commit into
Draft
Add Nexus tenant rate-limit interceptor interface with no-op default#11012prathyushpv wants to merge 1 commit into
prathyushpv wants to merge 1 commit into
Conversation
prathyushpv
force-pushed
the
ppv/nexus-caller-rate-limit-oss
branch
from
July 10, 2026 20:59
e4b7670 to
8c0f574
Compare
prathyushpv
force-pushed
the
ppv/nexus-caller-rate-limit-oss
branch
2 times, most recently
from
July 10, 2026 21:44
de2e428 to
8c0f574
Compare
prathyushpv
force-pushed
the
ppv/nexus-caller-rate-limit-oss
branch
from
July 10, 2026 22:05
8c0f574 to
6225636
Compare
This was referenced Jul 10, 2026
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 changed?
Adds an OSS
TenantRateLimitInterceptorextension point for Nexus per-tenant rate limiting: the interface + a no-op default (NewNoopTenantRateLimitInterceptor),ErrTenantRateLimitExceeded(causeRESOURCE_EXHAUSTED_CAUSE_TENANT_RPS_LIMIT, scopeNAMESPACE), an fx provider of the no-op, and a call site in the Nexus request path. Cloud injects the enforcing implementation viafx.Decorate.The tenant check is the first resource gate — it runs before namespace-concurrency, namespace-RPS, and the global RPS limiter — so one abusive tenant can't consume the shared namespace/global budget before being throttled.
Why?
OSS ships the schema/plumbing; enforcement is Cloud-only. The no-op default means zero behavior change for OSS.
How did you test it?
Potential risks
No-op default → no behavior change in OSS. [NOT READY]: references
enumspb.RESOURCE_EXHAUSTED_CAUSE_TENANT_RPS_LIMIT, which requires thego.temporal.io/apirelease (temporalio/api#827) + ago.modbump before this compiles in CI. Part of the Nexus tenant rate-limit feature.