TL;DR
- Spend Management is a billing control in Cloudflare that sets a dollar limit on usage-based products and pauses the product when the limit is reached; it entered Beta on 13 November 2026 for pay-as-you-go accounts, starting with Workers and Durable Objects.
- The configuration is small: a spending limit, a recipient email and one or more alert thresholds, set in the dashboard under Manage Account, Billing, Spend limits, or through the REST API and the cf CLI with a spend policy that carries
threshold_centsand an action ofusage_block. - Cloudflare built the control on a two-stage metering pipeline: parsers bucket raw events into one-minute windows, a second service merges those partial aggregates over five-minute windows, and the consolidated data is archived before the Usage Engine reads it.
- The Usage Engine partitions processing by account, keeping each account's usage and subscription state together with local state and a durable write-ahead log, so pricing runs in parallel across accounts and survives a failed processor.
- The Rating Engine combines usage records, subscription information and pricing rules, holds usage as pending when subscription data arrives late, applies included allowances and prices accumulated usage.
- Enforcement travels through Quicksilver, Cloudflare's internal key-value store for global replication: the runtime picks the cap up on its periodic refresh and rejects capped invocations from local state, which keeps rating out of the request path.
- A pause stops the invocations that incur cost. In Workers, Cron Triggers and Queue consumers stop. Static assets remain available. The block clears when the limit is raised, the policy is disabled or the next billing cycle starts.
Cloudflare's own screenshot of the Workers configuration: block usage at the limit, a 10 dollar cap, a recipient address and two alert thresholds. Source: blog.cloudflare.com/spend-management, retrieved 15 November 2026.
What Spend Management turns on in the dashboard
The launch post opens with the demand behind the feature: spend controls had been the most requested item from developers on the platform, and Cloudflare counts more than 10 million developers building on it. Usage notifications and budget alerts already existed for paid plans, and the billing documentation describes them as emails sent when account-wide usage-based spend crosses a dollar threshold. The new part is a limit that stops the product.
The configuration sits behind that sentence. A pay-as-you-go account enables controls on a product, sets a spending limit, names a recipient for notifications and picks one or more alert thresholds. The API call in the post carries the same fields as JSON: a name, a product identifier, an enabled flag, threshold_cents set to 10000, an action of usage_block and a notification address. The cf CLI exposes the same objects with list, create, get, update, delete and two audit commands.
Cloudflare's usage-based billing documentation lists the supported products, the included allowances and the notification options behind Spend Management. Source: developers.cloudflare.com/billing/understand/usage-based-billing, retrieved 15 November 2026.
One detail in the post is easy to miss and matters at month end: the billing cycle starts when the paid subscription begins, so a subscription that starts on 10 October gives a cycle from 10 October to 10 November. A team that sets a cap mid-cycle is measuring against a billing window that has already begun.
Two metering stages aggregate usage close to the source
Every invocation produces measurements, and the post names them: requests, CPU time, execution duration or storage operations, depending on the product. Shipping that volume intact to a rating engine would not scale, so Cloudflare aggregates close to the source in two stages.
The first stage runs next to parsing. Each metering parser converts raw events into usage measurements and combines matching ones into buckets that typically cover one minute, and the post is candid that several records can still describe the same account and time window. The second stage is a separate service that merges those partial aggregates with the same grouping rules over windows that typically cover five minutes, then archives the consolidated result as a durable dataset for analytics and reconciliation.
Cloudflare's diagram of the metering pipeline: parse, one-minute buckets, a merge over five-minute windows, then the Usage Engine and Rating Engine. Source: blog.cloudflare.com/spend-management, retrieved 15 November 2026.
The ordering is the interesting engineering decision. Volume falls before the expensive systems see it, so the Usage Engine and the Rating Engine only handle accumulated usage. For an operator reading this from outside, the lesson transfers to any internal metering work: the cost of a billing pipeline is dominated by the volume carried forward at raw resolution.
The Usage Engine keeps each account in one partition
The Usage Engine turns aggregated measurements into usage records, the standardized shape that carries an account identifier, a usage window, a usage metric, a measured quantity and the relevant product dimensions. Its other job is to map each product-specific meter onto the standardized usage metrics that the billing system supports.
Cloudflare's flow for one capped billable event: usage reports, the Usage Engine, the Rating Engine, policy evaluation, notifications, and the cap propagated to every node. Source: blog.cloudflare.com/spend-management, retrieved 15 November 2026.
Cloudflare partitions that processing by account, so an account's usage and subscription information meet in the same place and its accumulated usage plus included allowances can be maintained without coordinating with other pricing processors on every update. Each partition holds local state for fast access and a durable write-ahead log on disk, which the post credits with four properties: less cross-partition coordination, consistent pricing, parallel processing and recoverability after a failure.
The Rating Engine prices accumulated usage against allowances
The Rating Engine answers one question: given what the account has consumed, its subscription and its pricing, how much has it spent so far. It brings together usage records, subscription information and pricing rules covering rates, included allowances and billing rounding.
Cloudflare's pause notification: Workers reached a 10 dollar limit, the block is dated, and the notice states what a pause means. Source: blog.cloudflare.com/spend-management, retrieved 15 November 2026.
Usage and subscription data arrive as independent streams, so the two streams carry no ordering guarantee. The post describes the consequence directly: when usage arrives before the subscription information needed to price it, the engine retains it as pending and revisits it after the subscription information arrives, which tolerates a delayed webhook while retaining that usage for later pricing. The engine also applies the included allowance before pricing any excess, and it prices accumulated usage, with rounding applied to the total.
Two outputs follow. Policy evaluation decides whether a warning or blocking threshold has been reached, and reporting pushes estimated charges to the dashboard and sends the email alerts.
Enforcement runs on local state that Quicksilver propagates
Cloudflare's audit log for spend policies, listing the change, the member and the new limit. Source: blog.cloudflare.com/spend-management, retrieved 15 November 2026.
The rating engine stays out of the request path. When a policy blocks, the policy service sends the cap to the runtime configuration service and to Quicksilver, the internal key-value store Cloudflare built for fast global replication and low-latency access, and the cap propagates to all nodes asynchronously. Each runtime picks it up during its periodic refresh and starts rejecting capped invocations or operations.
The post states the property that makes this work: enforcement uses local state, so a request never waits on the Rating Engine. The architectural point for anyone designing a similar control is the split between where the decision is computed and where it is applied. The trade-off is a cap with a distributed enforcement delay: after policy evaluation, asynchronous propagation and periodic refresh leave an interval in which some runtimes may still accept billable invocations, so the configured amount cannot guarantee the final spend.
Runtime effects of the pause
A cap that lands rejects new invocations of the product, with one qualification the post states plainly: Cloudflare pauses the customer-code invocations that incur cost. In Workers, Cron Triggers and Queue consumer invocations stop. Static assets continue to be served.
Netics visual, 15 November 2026: the five stages a capped invocation passes through, as the post describes them.
That behaviour decides how a cap should be sized. A site whose traffic is mostly cached assets keeps answering requests. Scheduled jobs and queue consumers behind background work stop. An operator planning a cap around a public launch should expect the visible page to remain available. Asynchronous work accumulates unprocessed until the limit is raised, the policy is disabled or the next cycle begins.
The dashboard adds two facts an operator needs for the same discussion. Costs for each supported product appear in near real time, under 10 minutes, and an audit log records who changed a limit and when a cap was reached. Both feed the same operational question: how much spend can accumulate between the moment a threshold trips and the moment the block is picked up across the network.
Cloudflare is explicit that this is a first step. More products will follow, the team wants the gap between measurement and enforcement down toward a minute, and the post describes a future where calls are tagged so spend can be attributed to an application or an agentic task and paused across products. For now the control covers Workers and Durable Objects, and the cloud infrastructure and cost control work that teams already run at the account level gains a runtime counterpart.
Netics visual, 15 November 2026: what the pause covers in Workers, and how the block clears.
Originally published on the Netics blog.








Top comments (1)
Interesting take! Treating spending limits as an active runtime decision instead of just a passive billing alert makes a lot of sense, especially when sudden traffic or automated requests can spike cloud costs out of nowhere. Really clean breakdown.