March 10, 2026
Hit pause before your wallet screams
SHOW HN: A usage circuit breaker for Cloudflare Workers
Dev installs a budget kill‑switch to stop surprise bills — community cheers while skeptics warn of new headaches
TLDR: A developer built a self‑shutoff for Cloudflare Workers that pauses background tasks as usage nears monthly limits to avoid surprise bills. Commenters largely want this everywhere, calling budget blowouts a security risk, while a cautious minority says the cure adds complexity—making reliability the new battleground.
A solo builder behind 3mins.news just shipped a “budget circuit breaker” for Cloudflare Workers — think a self‑imposed off switch that pauses background jobs before you blow past monthly limits. It watches usage, sends early warnings, and at about 90% pulls the plug, then only turns things back on after dropping to 85%. The dev even tuned it so pricey stuff (like data writes) trips earlier, cheap stuff (like basic requests) just nags, and duplicate alert spam is squashed. Full write‑up is here: link.
The comments? A mix of war stories and “shut up and ship this everywhere.” One user says this problem hits across the board — “a retry loop can burn your whole CI budget in hours.” Another brands it a “panic button for your wallet,” while jokers call it a thermostat for your bill and a financial airbag. But there’s drama: westurner warns that adding this safety switch adds “more state” and more ways to break, urging caution. Meanwhile iam_circuit drops the spiciest take: budget blowouts aren’t just money — they’re security and uptime risks; attacks and bugs look the same on your invoice. Practical voices chime in with old‑school fixes (pull RSS less often), but the crowd’s mood leans clear: if platforms won’t give us spend limits with teeth, we’ll build our own — and maybe save our credit cards in the process.
Key Points
- •3mins.news runs fully on Cloudflare Workers with 10+ cron triggers handling RSS, clustering, LLM calls, and email.
- •Cloudflare Workers Paid Plan has strict monthly limits; overages (e.g., $5/M KV writes, $0.30/M requests) incur charges.
- •The author built an inward-facing circuit breaker that monitors resource usage and degrades operations before hitting limits.
- •Design features include per-resource thresholds, hysteresis (90% trip/85% recover), fail-safe on monitoring failure, and alert deduplication.
- •Implementation polls Cloudflare’s GraphQL and Observability APIs every five minutes, evaluates eight resource dimensions, caches state in KV, and skips scheduled tasks when tripped; it prevented an overage during two weeks of production.