Skip to content

Rate limit the client log route - #2469

Closed
kmcginnes wants to merge 1 commit into
t3/implement-issue-1635-client-log-routefrom
t3/implement-issue-1635
Closed

kmcginnes wants to merge 1 commit into
t3/implement-issue-1635-client-log-routefrom
t3/implement-issue-1635

Conversation

@kmcginnes

@kmcginnes kmcginnes commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Anyone who can reach the proxy can write to the log, so /logger needs a bound on how fast entries arrive.

User-facing: none

POST /logger
  415 if Content-Type is present and not JSON   (spends no budget)
  429 if more than 300 requests in the window   (answered directly, nothing logged)
  400 / 200 as before
  • createRateLimiter is a small fixed-window limiter in rate-limiter.ts, one per app.
  • The limit is 300 requests a minute across all callers, and invalid requests count.

Evidence

Before: no limit on request volume.
After: the 301st request in a window gets a 429 and writes no log entry at any level. The window rolls over at exactly 60 seconds, and rejected form posts don't use up the budget.

Merge Danger

Door: two-way

Impact: consumers

A caller sending more than 300 log requests in a minute gets 429s.

Related

Layer: 2-client-log-rate-limit
@kmcginnes
kmcginnes added this pull request to stack #2470 October 23, 2026 01:12
@kmcginnes

Copy link
Copy Markdown
Collaborator Author

Dropping the rate limiter: the 10,000-character cap already bounds each entry, and Graph Explorer is the only caller.

@kmcginnes kmcginnes closed this Oct 23, 2026
@kmcginnes
kmcginnes deleted the t3/implement-issue-1635 branch October 23, 2026 01:18
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.

Improve client-to-server logging endpoint

1 participant