Repository navigation
Commit 52dfd4a
fix(relay): share the Cloudflare rate-limit pause across Worker isolates
The pause added for #16810 lived in each isolate, so every isolate had
to hit a 429 itself before it backed off, and hundreds of them could
keep the account at its limit. A 429 now records the pause in Postgres
(relay_upstream_api_pauses), and each isolate rereads it at most every
5 s before calling Cloudflare. Reads and writes fail open.
Refs #16810
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent c4264fd commit 52dfd4a
7 files changed
Lines changed: 1921 additions & 179 deletions
File tree
- infra/relay
- migrations/postgres/20261020013101_upstream_api_pauses
- src
- environments
- persistence
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments