Gradual Deployments for Workers and Durable Objects
Worker deployments go live in seconds, which is convenient until a bad change reaches every user at once. A rollout that stays live for all traffic for 45 seconds can produce millions of failed requests, and an unsharded code change can trigger a retry storm against a backend.
A rolling deployment addresses this: the current version keeps serving production, the new version is released to a small share of traffic and monitored for regressions, and the traffic percentage is increased step by step until the new version takes 100%.
Gradual Deployments is entering open beta and is available through the Cloudflare API, the Wrangler CLI, or the Workers dashboard. It can be used with any account on the Workers Free plan, with Workers Paid and Enterprise support following soon; a dashboard banner indicates when an account has access.

Per-version observability and affinity
Running two versions side by side is only useful if you can tell them apart in your telemetry. Observability is now available at the version level across the platform:
- Workers dashboard analytics and the GraphQL Analytics API can be filtered by version.
- Workers Trace Events and Tail Worker events carry the version ID plus optional version message and version tag fields.
wrangler tailcan show live logs for a specific version.- The Version Metadata binding exposes version ID, message, and tag to Worker code.
Two mechanisms keep a given client on one version. Version Affinity routes requests tied to an identifier — a user, a session, any unique ID — to a consistent version. Session Affinity used with Ruleset Engine lets you control both the mechanism and the identifier behind that stickiness.
On the path to GA, work is underway on Version Overrides (invoking a specific version before it serves production traffic, enabling Blue-Green Deployments), Cloudflare Pages support (letting the Pages CI/CD system progress deployments automatically), and automatic rollbacks (reverting when the error rate of a new version spikes).
Deobfuscated stack traces via Source Maps
Production JavaScript is bundled, often transpiled, and minified before deployment. This produces stack traces like /src/index.js:1:342 — an offset into minified code that says little about the defect. Source maps map compiled output back to the original source and, combined with the runtime's stack trace, yield a human-readable result such as the line in down.ts that received an unexpected null.
Unexpected input value: null
at parseBytes (src/down.ts:30:8)
at down_default (src/down.ts:10:19)
at Object.fetch (src/index.ts:11:12)
The flow is:
- Setting
upload_source_maps = truein wrangler.toml makes Wrangler generate and upload source maps duringwrangler deployorwrangler versions upload. - When the Worker throws an uncaught exception, Cloudflare fetches the source map and maps the stack trace to the original source lines.
- The deobfuscated trace appears in real-time logs or in Tail Workers.
Source map upload is in open beta now. The runtime begins using source maps to deobfuscate stack traces on April 15th, with availability announced via dashboard notification and the Cloudflare Developers X account.
Runtime Rate Limiting in Workers
Since 2017, Rate Limiting rules could be configured only through the Cloudflare dashboard or API; a Worker had no way to define limits at runtime, only to receive requests already filtered upstream.
The new Rate Limiting API, in open beta, backs rate limits with memcached and exposes them directly to a Worker through a binding. This configuration defines a limit of 100 requests per 60 seconds:
[[unsafe.bindings]]
name = "RATE_LIMITER"
type = "ratelimit"
namespace_id = "1001" # An identifier unique to your Cloudflare account
# Limit: the number of tokens allowed within a given period, in a single Cloudflare location
# Period: the duration of the period, in seconds. Must be either 60 or 10
simple = { limit = 100, period = 60 }
The Worker then calls the limit method on the RATE_LIMITER binding with a key of your choosing. With the configuration above, the code returns HTTP 429 once more than 100 requests to a given path are made within a 60-second period:
export default {
async fetch(request, env) {
const { pathname } = new URL(request.url)
const { success } = await env.RATE_LIMITER.limit({ key: pathname })
if (!success) {
return new Response(`429 Failure – rate limit exceeded for ${pathname}`, { status: 429 })
}
return new Response(`Success!`)
}
}
Rate limiting is described as the first of several primitives being explored for temporary shared state spanning many Worker isolates — counters, locks, and an in-memory cache among them — as an alternative to state kept in the Worker's global scope.
Generated SDKs for the Cloudflare API
Cloudflare updates its API schemas between 20 and 30 times per day, and its SDKs were previously written and maintained by hand. New client SDKs for TypeScript, Python, and Go are now generated automatically with Stainless API from the OpenAPI schemas, and are regenerated and republished whenever the API gains functionality, with more languages planned.
// Typescript
npm install cloudflare
// Python
pip install cloudflare
// Go
go get -u github.com/cloudflare/cloudflare-go/v2
The Cloudflare Terraform Provider currently rests on the existing, non-automated Go SDK — terraform apply works out which API requests to make and in what order, then executes them through that SDK. The new auto-generated Go SDK is intended as a base for more comprehensive Terraform coverage across all Cloudflare products. The stated goal is that any feature exposed through the Cloudflare API is automatically supported by the SDKs, with more updates expected during 2024.
Durable Objects: analytics and WebSocket Hibernation GA
Durable Objects are deployed globally, now including Oceania, and act as singleton Workers offering a single point of coordination with persistent state. The revamped Durable Objects dashboard now exposes usage and error metrics for a namespace, which previously required the GraphQL Analytics API.

Idle WebSocket clients are a cost problem: an abandoned browser tab holding a long-lived connection forces the Durable Object to stay running for nothing. WebSocket Hibernation, now generally available after beta, lets you define an automatic response and serialize state across hibernation. Cloudflare keeps the client connections open while the Durable Object stops running, so state is in memory when needed, and no duration charges accrue while it hibernates — even with clients still connected.
Incoming WebSocket messages are also priced differently from today: they bill at the equivalent of 1/20th of a request, down from one message counting as one request.
| WebSocket Connection Requests | Incoming WebSocket Messages | Billed Requests | Request Billing | |
|---|---|---|---|---|
| Before | 10K | 432M | 432,010,000 | $64.65 |
| After | 10K | 432M | 21,610,000 | $3.09 |



