Skip to content

fix(dataplane): agent ingest honors instance ingest rate limit#2744

Merged
mekilis merged 1 commit into
mainfrom
pde-931-agent-ingest-rate
Jul 20, 2026
Merged

fix(dataplane): agent ingest honors instance ingest rate limit#2744
mekilis merged 1 commit into
mainfrom
pde-931-agent-ingest-rate

Conversation

@mekilis

@mekilis mekilis commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The data-plane/agent /ingest route was rate-limited by ApiRateLimit while the control plane's /ingest uses InstanceIngestRate, so CONVOY_INSTANCE_INGEST_RATE silently had no effect on agent ingest (operators saw the ceiling clamp to the API default instead). The agent route now uses InstanceIngestRate, same as the control plane.
  • Added a route test that builds both planes with a mocked limiter and asserts /ingest is limited by InstanceIngestRate on each; it fails without the fix.
  • ApiRateLimit still governs the REST /api/v1/projects routes 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_LIMIT expecting it to govern agent ingest should set CONVOY_INSTANCE_INGEST_RATE after upgrading.

Test plan

  • go test ./api/ -run 'TestIngestRoutesUseInstanceIngestRate|Test_extractPayloadFromIngestEventReq' (9 passed; data-plane subtest fails with the fix stashed)
  • gofmt, go vet, golangci-lint clean on touched packages

Fixes PDE-931

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.
@linear

linear Bot commented Jul 20, 2026

Copy link
Copy Markdown

PDE-931

@cursor

cursor Bot commented Jul 20, 2026

Copy link
Copy Markdown

Current version of PR was reviewed by /review-bugbot on Jul 20, 15:27 GMT+1. It flagged 0 findings.

Bugbot on commit c779a5f is skipped.

@mekilis mekilis changed the title fix: agent ingest honors instance ingest rate limit fix(dataplane): agent ingest honors instance ingest rate limit Jul 20, 2026
@mekilis
mekilis enabled auto-merge July 20, 2026 15:48
@mekilis
mekilis merged commit 73fd54e into main Jul 20, 2026
35 of 36 checks passed
@mekilis
mekilis deleted the pde-931-agent-ingest-rate branch July 20, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant