Why hard spending caps take time: Ashley Peacock on billing latency
Ashley Peacock (@ashleypeacock), who works on Durable Objects at Cloudflare, explains from experience why near-real-time spending caps are hard to build, says hard billing caps are coming soon, and suggests budget alerts plus issue alerts in the meantime.
- Products
- Account-wide usage-based productsDurable Objects
- Source
- Author experience𝕏
- Author
- Ashley Peacock (@ashleypeacock)
Key points
- The author says he does not work on spending caps directly and speaks from experience plus a little of what he has seen internally.
- He describes billing as typically an OLAP workload: at AWS, the last time he checked, current-day spend appears only after an overnight job writes the figures the next day, which he calls the norm for many services at scale.
- Spending caps, he writes, need near-real-time data and OLTP-level support; Cloudflare’s developer platform spans many products, so billing has to migrate and decide how and where to cap. He says the work has been in progress but is not a quick win.
- Cloudflare’s current Budget alerts documentation says alerts email recipients once per billing period when account-wide usage-based spend crosses the threshold, and that they do not pause or cap usage.
Original sources
Published
Original post
Read on 𝕏Ashley Peacock (@ashleypeacock), who works on Durable Objects at Cloudflare, explains from experience why near-real-time spending caps are hard to build, says hard billing caps are coming soon, and suggests budget alerts plus issue alerts in the meantime.
Ashley Peacock
@ashleypeacock · Original 𝕏 post
I’m not directly working on it, so I can only speak from experience + a little of what I’ve seen internally Billing is typically an OLAP workload, if you look at AWS (last time I checked), you can’t see what you’ve spent on the current day until the next day when an overnight job runs and generates the figures into a DB once a day. This is the norm for a lot of services, at least at meaningful scale. That means it’s simply not designed to be real-time, much less accessed by high throughput OLTP workloads Spending caps need both: real time (or close) and support for OLTP workloads. Further, Cloudflare’s dev platform has an array of products, so their billing needs to migrate + of course all the stuff needed at an OLTP level (how to cap, where to cap etc) So it has been in the works for a little bit, but the kind of work above is no quick win + takes time and consideration of how to approach
In another reply under @shmily7’s thread, the author writes that hard billing caps are coming soon and that he is looking at what more can be done on the Durable Objects side, which is not straightforward because legitimate use cases must be accounted for.
Read on 𝕏Ashley Peacock
@ashleypeacock · Original 𝕏 post
Hard billing caps are coming soon, and I’m seeing if there’s more we can do on the DO side but it’s not straightforward to solve (e.g. there are legitimate use cases we need to account for)
Replying to a user, the author suggests a budget alert as a starting point, says a hard cap will be available in the near future, and suggests sending Workers issue detection to coding agents or Slack. He adds that such incidents are rare and the team is working to reduce them.
Read on 𝕏Ashley Peacock
@ashleypeacock · Original 𝕏 post
I would set a budget alert: https://t.co/SEi98raqde as a starting point, you’ll be able to set a hard cap in the near future too. You can also hook https://t.co/4hNdjY4QLG up to your coding agents, so any anomalies or issues spotted get sent to them (or get a Slack message or something works too, then you can look yourself) It’s worth saying that while these things do happen from time to time, they are incredibly rare in the grand scheme of things and we’re working to reduces instances further
Replying to a developer who says many small developers would rather have a hard budget cap that stops the service, the author writes that caps are coming very soon.
Read on 𝕏Ashley Peacock
@ashleypeacock · Original 𝕏 post
They are coming very soon
More to read
hontrandev: a Workers Free D1 board list query read about 15,000 rows to return 58
On 2026-11-18, X user @hontrandev wrote that Cloudflare emailed that D1 had reached 78% of the 5 million rows-read-per-day limit on Workers Free, for a small internal ticketing app. The author says one board list query was reading about 15,000 rows to return 58, and that they wrote up why and how they fixed it, with a link in a reply. This is a usage warning on the Free daily cap, not an invoice amount.
igorrizzom: a forgotten Durable Object alarm billed US$ 2,038; Support refunded US$ 1,533.29, leaving US$ 505.
X user @igorrizzom (Igor Rizzo), who also posted on Cloudflare Community as igorarm (urnaaovivo.com), says a personal, non-commercial prototype that collected public election data in Brazil was left running after the October 25 runoff. A Durable Object kept rescheduling itself via alarm every ~5 seconds and writing to SQLite, and the invoice reached US$ 2,038, almost all from DO rows written, with about 10k pageviews. The author says budget alerts were set up but went to an old inbox that was never checked, and that alerts do not stop usage. Spend limits for Workers and Durable Objects were only announced on November 13, after almost all of the usage; the author then set a US$ 1 spend limit, turned the collector off, and removed Cron Triggers. The author says Support refunded US$ 1,533.29 as a one-time courtesy. The remaining US$ 505, which the author later described as US$ 500 of usage plus the US$ 5 Workers Paid fee, was closed as final; the author asked for a supervisor review in case #02442826 (follow-up to #02435308) and also asked @SidChatterjee whether any goodwill path remained for pre-launch cases. There is no Cloudflare staff reply on the public X thread or the Community thread. Public Support actions are reported by the author.
Ru Bite: In Spend Management, turn on Block usage under Billing → Spend limits; limits reset on the subscription billing period, the notification email must be filled in separately, and after Durable Objects are paused storage fees may still continue
On 2026-11-19, X user @JustLikeBit (Ru Bite) wrote a set of notes on metered cloud services having their free quota burned through by bots, and on Cloudflare Spend Management. The author says the entry point is Billing → Spend limits: select Workers or Durable Objects, set a limit, and turn on Block usage; once the limit is hit, supported operations are blocked automatically, and it does not rely only on email alerts. A follow-up adds: limits reset on the subscription billing period, not necessarily on the 1st of each month—for example, if the renewal date is the 15th, counting starts from the 15th; to receive emails at the 80% and 100% thresholds, notification_email must also be configured separately, and setting a limit does not fill in the notification email automatically; after Durable Objects are paused, storage fees for existing data may still continue. The author attached a link to the official documentation. These are the author's restatement of official capabilities and operational reminders, not an actual bill.