Skip to content

NewsDevView as Markdown

Cloudflare Spend Management beta: spending caps for Workers

Cloudflare launched Spend Management in beta. When spending reaches a limit you set, it pauses Workers and Durable Objects, where earlier alerts only informed.

Source Cloudflare Blog

Cloudflare introduced Spend Management on November 13, a beta feature that pauses Workers and Durable Objects once spending reaches a limit you set, so an unexpected bill cannot run away. Any pay-as-you-go customer can use it. Earlier usage and budget alerts only informed, while this feature controls usage itself. Other products are coming soon.

Image: Cloudflare Blog

You turn it on per product and set a spending limit, a notification email and one or more alert thresholds. Cloudflare emails you when spending reaches a threshold and rejects new calls at the limit. Only billable customer code calls are paused, so Cron Triggers and Queue consumers stop while static assets keep being served. Raising the limit above current spend, disabling or deleting the policy, or waiting for the next billing cycle resumes service, and the cycle follows the day the paid subscription started, not the calendar month. You can set it up in the dashboard (Billing, Spend limits), through the REST API (spend-policies) or with the cf CLI.

Image: Cloudflare Blog

Cloudflare says costs take about ten minutes or less to be reflected and aims to bring the gap between measurement and enforcement under one minute. Because limits propagate asynchronously, a few calls right after the limit may still get through, but that is our inference, not something the post states. Cloudflare plans to extend the feature to other products and to budgets for a specific application or AI agent task rather than a whole product.