Turn free allowances into daily budgets with alerts at 70% and 90%
风易 (@Michael_liyang) says 100,000 requests a day and 5 million rows read a day are hard walls, not a safety margin: split production and test into different Workers and D1 databases, alert at 70% and 90%, and degrade before the site returns 500s.
- Products
- WorkersD1R2Workers AI
- Source
- Author experience𝕏 post
- Author
- 风易 (@Michael_liyang)
Key points
- He says the free allowances should first be converted into a daily budget: 100,000 requests and 5 million rows read per day are hard walls, not a cushion.
- His setup: separate Workers and D1 databases for production and testing, two alert lines at 70% and 90%, and degrade gracefully when the limit is hit instead of returning 500 for the whole site.
- In a later reply he splits the daily budget into four lines — D1 reads and writes, R2 storage and requests, Workers AI Neurons and Workers requests — with an alert at 70% and degradation at 90% for any of them.
- Cloudflare’s Workers Free request limit is account-wide (Workers limits page read on 2026-11-04), so separating Workers keeps data stores apart but not the account-level request allowance.
Original sources
Published
Original post
Read on 𝕏风易 (@Michael_liyang) says 100,000 requests a day and 5 million rows read a day are hard walls, not a safety margin: split production and test into different Workers and D1 databases, alert at 70% and 90%, and degrade before the site returns 500s.
风易 | AI 工具链
@Michael_liyang · Original 𝕏 post
这些免费额度最该先换算成日预算:10 万次请求和每天 500 万行读取是硬墙,不是安全垫。把生产/测试拆成不同 Worker 和 D1,设 70% / 90% 两道告警,超限时先降级而不是整站 500。
Reply: 100,000 free Workers requests a day does not mean the whole stack is free; split D1 reads and writes, R2 storage and requests, and Workers AI Neurons into four daily budgets, alert at 70% and degrade at 90%.
Read on 𝕏风易 | AI 工具链
@Michael_liyang · Original 𝕏 post
@kazegogogo 补一个成本边界:Workers 免费档每天 100,000 请求不等于全栈零成本,把 D1 读写、R2 存储/请求、Workers AI neurons 拆成四项日预算,任一到 70% 告警、90% 降级。
Michael restates Free budgets: Workers 100,000 requests/day, D1 5 GB, R2 10 GB storage; record used/limit, alert at 70%, degrade at 90%, return 429 past the line; keep request_id/route/status/duration_ms in logs.
Read on 𝕏风易 | AI 工具链
@Michael_liyang · Original 𝕏 post
先说结论:把 Cloudflare 免费层做成预算,不要等超额才发现。可直接照抄这组上限:Workers 100,000 请求/天、D1 5 GB、R2 10 GB 存储。把用量按 `used/limit` 记录,70% 告警、90% 降级,超线返回 429;请求日志至少保留 `request_id / route / status / duration_ms`。你现在最先会撞到哪一项:请求数、D1 还是 R2?
风易 (@Michael_liyang) replies with a quota table to keep: Workers daily requests, CPU ms and subrequests; D1 total storage and rows read/written; R2 storage and Class A/B operations; KV reads and writes — each with a 70% alert and 90% degradation.
Read on 𝕏风易 | AI 工具链
@Michael_liyang · Original 𝕏 post
@Suercha007 先把免费额度做成表:Workers 记每天请求数、CPU 毫秒和子请求;D1 记总存储、读写行数;R2 记存储、Class A/B 操作;KV 记读写次数。每项写 70% 告警、90% 降级,比继续找新免费服务更能避免突然停服。
More to read
sean1093/purse-strings: in-process LLM spend budgets, with optional Durable Objects or KV stores
The MIT-licensed TypeScript library purse-strings (sean1093/purse-strings) is described as a denial-of-wallet guard for apps that call LLM APIs: per-user, per-session and global token, cost and request budgets, plus step, tool-call and time limits for agent loops. It has zero runtime dependencies and can keep counters in memory, Firestore, or Cloudflare Durable Objects or Workers KV. The README warns that with multiple process replicas, each replica enforces the limit, so the effective limit is N times the configured value unless a shared store is used, and that a Durable Objects or KV store is what a hard limit needs. Reviewed from the public README on 2026-11-19. Example figures in the docs include a user-daily cap of costUsd: 1 and a fleet-daily cap of costUsd: 200.
neoblender13: an AI agent’s recursive alarm system turned a ~$10 monthly Cloudflare bill into $1,500; $400 credited.
neoblender13 says the Cloudflare bill is normally around $10 a month, but this month it was hit with a $1,500 bill because an AI agent created a recursive alarm system that ballooned Durable Objects storage writes, and that Cloudflare support was not very helpful. In later replies the author says they did not realize spending limits were alert only, received a $400 credit and still had to pay $1,100, that the single alert email got buried in the inbox, and that a Discord bot now reports costs every 12 hours.
Observability pricing (from December 1, 2026)
Cloudflare’s unified pricing for logs and traces: Workers Logs, Workers Traces, Containers logs, R2 data access logs and AI Gateway logs move to per-GB ingestion and GB-month storage on December 1, 2026.