
Cloudflare Launches Spend Management Beta for Workers and Durable Objects
Cloudflare has introduced Spend Management in beta for pay-as-you-go customers, starting with Workers and Durable Objects, allowing spending limits, alerts, and automatic pausing when the spending limit is reached.
Cloudflare has introduced Spend Management in beta for pay-as-you-go customers, starting with Workers and Durable Objects. The feature lets customers set spending thresholds and receive alerts, and pauses activity automatically when the spending limit is reached. It is available through the dashboard, cf CLI, and REST API, and works alongside AI Gateway spend limits.
How Spend Management works
Customers can enable controls for supported products, define a spending limit, choose a notification email, and set alert thresholds. When evaluated spend reaches a threshold or the spending limit, Cloudflare sends notifications. When the limit is reached, a blocking policy is enforced and the product is paused automatically. Current billing cycle costs appear in the dashboard in near real time, under 10 minutes, and an audit log shows changes and reached caps.
What gets paused
Once a cap is enforced, new invocations that incur costs are rejected. In Workers, Cron Triggers and Queue consumer invocations are paused, while static assets continue to be served. Customers can resume service by raising the limit above accumulated spend, disabling or deleting the blocking policy, or waiting until the next billing cycle when the existing block expires.
How Cloudflare built it
The system uses a two-stage metering pipeline that aggregates usage close to the source, then an account-partitioned Usage Engine and a Rating Engine that converts usage into monetary value. The Rating Engine tracks accumulated spend, applies allowances, and evaluates warning or blocking thresholds. Enforcement is asynchronous: the policy service sends caps to runtime configuration and Quicksilver, so requests do not wait on the Rating Engine.
What comes next
Cloudflare plans to add more products, reduce the gap between measurement and enforcement to under a minute, and support application and agent based budgets. AI Gateway already supports per user and per model budgets for Workers AI and other providers routed through a gateway.
Sources: Cloudflare
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.