Skip to content

Give filtered listings with three or fewer parameters their own rate budget - #225

Merged
HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-2c0cn9
Nov 30, 2026
Merged

HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-2c0cn9

Conversation

@HarryCordewener

Copy link
Copy Markdown
Member

Requested by Grave · project thread

Why

Cloudflare analytics for 2026-11-30 show 4.44M 429s on filtered /games in 24h. For the last few hours the flood has run at about 130 req/s, while successful filtered responses held at 14.9 req/s, which is the 15 req/s shared cap. The traffic comes from a residential proxy pool across dozens of ASNs (FiberPower about 25%), and no single address sends more than about 0.2 req/s, so the per-IP limit almost never fires. The flood keeps the shared bucket empty, so readers and search crawlers using one or two filters get 429s. ClaudeBot, Bingbot, Applebot and others took 7,036 of them.

99% of the flood's URLs carry five or more filters, while shallow requests (three or fewer parameters) total about 11k a day.

What

  • Cloudflare (already applied): two Request Header Transform Rules. The first strips client-sent X-MUI-Shallow-Filter; the second sets it to 1 when len(http.request.uri.args.names) le 3.
  • deploy/traefik/incident-limits.yml: adds a mui-games-shallow router at priority 110, matching the same filtered-listing rule plus that header. It keeps the same per-client limit, with its own shared rate of 10 req/s (burst 20) and 10 requests in flight.
  • Deep combinations keep the existing 15 req/s, so the flood is slowed, not blocked. A request without the header, including one sent straight to the origin, falls to the deep limits.
  • docs/deploy.md documents both halves.

Deploy

Pull in /opt/muindex. The dynamic file is watched, so no restart is needed. Afterwards, check that mui-games-shallow@file appears in Traefik's access log for a one-filter /games?codebase=PennMUSH request.


Generated by Claude Code

…budget

The filtered-listing flood on 2026-11-30 ran at about 130 req/s from a
residential proxy pool and kept the shared 15 req/s bucket empty, so readers
and search crawlers using one or two filters got 429s. 99% of the flood's
URLs carry five or more filters. Cloudflare now sets X-MUI-Shallow-Filter
for requests with three or fewer query parameters (and strips it otherwise);
a priority-110 router gives those a separate 10 req/s shared bucket. Deep
combinations keep their existing limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rqqt7SRFvG48gttX6RQhfE
@HarryCordewener HarryCordewener self-assigned this Nov 30, 2026
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@HarryCordewener
HarryCordewener marked this pull request as ready for review November 30, 2026 23:04
@HarryCordewener
HarryCordewener merged commit 464093d into main Nov 30, 2026
2 of 3 checks passed
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