fix(dataplane): agent ingest honors instance ingest rate limit#2744
Merged
Conversation
the data plane's /ingest route limited requests with ApiRateLimit while the control plane's /ingest used InstanceIngestRate, so CONVOY_INSTANCE_INGEST_RATE silently did nothing for agent ingest and tuning CONVOY_API_RATE_LIMIT moved the REST API limit alongside it. align the agent route to InstanceIngestRate so one knob governs every ingest surface, and add a route-level test asserting the knob each plane's /ingest limiter is built from.
|
Current version of PR was reviewed by /review-bugbot on Jul 20, 15:27 GMT+1. It flagged 0 findings. Bugbot on commit |
mekilis
enabled auto-merge
July 20, 2026 15:48
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.
Summary
/ingestroute was rate-limited byApiRateLimitwhile the control plane's/ingestusesInstanceIngestRate, soCONVOY_INSTANCE_INGEST_RATEsilently had no effect on agent ingest (operators saw the ceiling clamp to the API default instead). The agent route now usesInstanceIngestRate, same as the control plane./ingestis limited byInstanceIngestRateon each; it fails without the fix.ApiRateLimitstill governs the REST/api/v1/projectsroutes on both planes, unchanged. License entitlement clamping already runs before either plane is built, so licensed overrides now reach agent ingest identically.Compatibility
Both knobs default to 1000/s on main, so untuned installs see no change. Operators who tuned
CONVOY_API_RATE_LIMITexpecting it to govern agent ingest should setCONVOY_INSTANCE_INGEST_RATEafter upgrading.Test plan
go test ./api/ -run 'TestIngestRoutesUseInstanceIngestRate|Test_extractPayloadFromIngestEventReq'(9 passed; data-plane subtest fails with the fix stashed)Fixes PDE-931