Skip to content

feat(views): Add IP-based rate limit tracking for 404 errors#19468

Draft
miketheman wants to merge 1 commit intomainfrom
claude/rate-limit-404-errors-z6iVt
Draft

feat(views): Add IP-based rate limit tracking for 404 errors#19468
miketheman wants to merge 1 commit intomainfrom
claude/rate-limit-404-errors-z6iVt

Conversation

@miketheman
Copy link
Member

This adds an observation-mode rate limit implementation for excessive 404
errors from a given client IP. Currently the implementation:

  • Tracks 404 requests per IP using the existing rate limiting infrastructure
  • Emits metrics (warehouse.notfound.ratelimiter.hit and
    warehouse.notfound.ratelimiter.exceeded) for monitoring
  • Logs warnings when rate limits are exceeded for investigation

The rate limit is currently configured at 50 requests per 5 minutes
(configurable via NOTFOUND_RATELIMIT_STRING env var) and operates in
observation mode only - it does not block requests. Once the tunable
values are determined from live data, blocking can be enabled.

This helps identify misconfigured clients and crawlers that abuse the
index by generating excessive 404s.

https://claude.ai/code/session_01F8syZGanCFSwRMVwCD1493

This adds an observation-mode rate limit implementation for excessive 404
errors from a given client IP. Currently the implementation:

- Tracks 404 requests per IP using the existing rate limiting infrastructure
- Emits metrics (warehouse.notfound.ratelimiter.hit and
  warehouse.notfound.ratelimiter.exceeded) for monitoring
- Logs warnings when rate limits are exceeded for investigation

The rate limit is currently configured at 50 requests per 5 minutes
(configurable via NOTFOUND_RATELIMIT_STRING env var) and operates in
observation mode only - it does not block requests. Once the tunable
values are determined from live data, blocking can be enabled.

This helps identify misconfigured clients and crawlers that abuse the
index by generating excessive 404s.

https://claude.ai/code/session_01F8syZGanCFSwRMVwCD1493
@miketheman miketheman requested a review from a team as a code owner February 5, 2026 12:47
@miketheman miketheman marked this pull request as draft February 5, 2026 20:38
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.

2 participants