Production refused 1,052 of the UI's own requests with 429 in the last 24 hours (840 executions-list loads and 212 workers-list loads). There were two causes:
Every user reaches Pulse through the reverse proxy, so the per-IP limiter put the whole team in one bucket.
Each open page reloaded its whole list on every live event. Gandalf alone produces about two events per command, every few seconds.
Server: separate buckets (lib/ratelimit.js)
A trusted SSO identity gets its own bucket (user:<name>). Identity headers from anywhere other than the proxy are ignored.
Gandalf gets a bucket only when it sends the valid key. With an invalid key the request falls back to the IP bucket, so a forged header can't drain Gandalf's bucket.
Everything else is keyed by IP, as before (IPv6 grouped by subnet).
The API default rises from 300 to 1,000 requests per 15 minutes per bucket. PULSE_API_RATE_MAX still overrides it.
Gandalf's ~8,700 internal requests per day stay well within its own bucket.
Pages: coalesce live-event reloads
A new Pulse.util.throttle runs a reload at most once per 2 s: immediately when idle, then once at the end of the window, so the latest state always lands. It's used for live events on Executions, Dashboard and Workers. Your own actions (delete, clear, refresh) still reload immediately.
No visual change. The UI screenshots job will show it.
Tests
Unit tests cover the bucket keys: per-user, spoofed headers, valid and invalid Gandalf keys, IP.
Locally: unit 147/147, integration 46/46, UI 33/33, including the live-update test with the throttle in place.
The issue's third suggestion, a "rate limited, retrying" message on 429, is visual; it can follow as its own screenshot PR if it's still needed.
Closes #10.
**Production refused 1,052 of the UI's own requests with 429 in the last 24 hours** (840 executions-list loads and 212 workers-list loads). There were two causes:
1. Every user reaches Pulse through the reverse proxy, so the per-IP limiter put the whole team in **one** bucket.
2. Each open page reloaded its whole list on **every** live event. Gandalf alone produces about two events per command, every few seconds.
## Server: separate buckets (`lib/ratelimit.js`)
- A trusted SSO identity gets its own bucket (`user:<name>`). Identity headers from anywhere other than the proxy are ignored.
- Gandalf gets a bucket only when it sends the **valid** key. With an invalid key the request falls back to the IP bucket, so a forged header can't drain Gandalf's bucket.
- Everything else is keyed by IP, as before (IPv6 grouped by subnet).
- The API default rises from 300 to 1,000 requests per 15 minutes per bucket. `PULSE_API_RATE_MAX` still overrides it.
Gandalf's ~8,700 internal requests per day stay well within its own bucket.
## Pages: coalesce live-event reloads
A new `Pulse.util.throttle` runs a reload at most once per 2 s: immediately when idle, then once at the end of the window, so the latest state always lands. It's used for live events on Executions, Dashboard and Workers. Your own actions (delete, clear, refresh) still reload immediately.
**No visual change.** The `UI screenshots` job will show it.
## Tests
- Unit tests cover the bucket keys: per-user, spoofed headers, valid and invalid Gandalf keys, IP.
- Locally: unit 147/147, integration 46/46, UI 33/33, including the live-update test with the throttle in place.
The issue's third suggestion, a "rate limited, retrying" message on 429, is visual; it can follow as its own screenshot PR if it's still needed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Production refused 1,052 of the UI's requests with 429 in one day: every
user arrives through the reverse proxy, so the per-IP limiter put the
whole team in one bucket, and each open page reloaded its whole list on
every live event (about two per Gandalf command).
- lib/ratelimit.js keys both limiters: a trusted SSO identity gets
user:<name>, a request with the valid Gandalf key gets 'gandalf' (an
invalid key falls back to the IP, so nobody can drain Gandalf's bucket),
everything else the IP. The API default goes from 300 to 1000 per
15 min per bucket.
- Pulse.util.throttle: live-event reloads on Executions, Dashboard and
Workers run at most once per 2 s (at once when idle, then once at the end
of the window). User actions still reload immediately.
- Unit tests for the keys. No visual change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared
merged commit 9a6a4c0b66 into main2026-11-23 11:34:16 -05:00
jared
deleted branch rate-limits2026-11-23 11:34:25 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #10.
Production refused 1,052 of the UI's own requests with 429 in the last 24 hours (840 executions-list loads and 212 workers-list loads). There were two causes:
Server: separate buckets (
lib/ratelimit.js)user:<name>). Identity headers from anywhere other than the proxy are ignored.PULSE_API_RATE_MAXstill overrides it.Gandalf's ~8,700 internal requests per day stay well within its own bucket.
Pages: coalesce live-event reloads
A new
Pulse.util.throttleruns a reload at most once per 2 s: immediately when idle, then once at the end of the window, so the latest state always lands. It's used for live events on Executions, Dashboard and Workers. Your own actions (delete, clear, refresh) still reload immediately.No visual change. The
UI screenshotsjob will show it.Tests
The issue's third suggestion, a "rate limited, retrying" message on 429, is visual; it can follow as its own screenshot PR if it's still needed.
🤖 Generated with Claude Code