Flip Features in Sub-Milliseconds: Meet Cloudflare Flagship!
Hey there, it's Shiichan! Today I want to talk about a new way to separate deploying your code from releasing your features. Flags that evaluate right at the edge? I'm so excited!
Cloudflare Blog
What was announced?
On Cloudflare's Blog, a new feature flag service called Flagship was announced! It's a feature flag service that runs natively on top of Cloudflare's global network, and it's in private beta as of April 17, 2026.
Feature flags let you decouple "deploying code" from "releasing a feature." You can change how a feature appears just by flipping a flag on or off, which is perfect for an era where AI agents ship code to production on their own.
The story so far
Before Flagship, Workers developers had only two frustrating options.
- Hardcode flags into the code. It's easy, but flags end up scattered everywhere, with no central visibility and no audit trail.
- Call an external flag evaluation service. But that means an outbound HTTP request on every request, which adds latency even though you're sitting right next to your users at the edge.
On top of that, the usual "local evaluation" SDKs don't work on Workers. A Workers isolate is ephemeral, so there's no long-lived process to cache your flag configuration between requests.
What changes
Flagship moves flag evaluation entirely to the edge. Here's how the post puts it:
Both the data and the logic live at the edge — nothing is sent elsewhere to be evaluated.
Because the data and the logic both live at the edge, you can evaluate flags in sub-millisecond time with no external network calls. You keep Workers' speed while still being able to control feature rollout, without suffering the latency of an external service. Great news for developers, and for AI agents that want to ship code safely!
Dive Deep
Here's the flow. The control plane writes flag changes atomically into a Durable Object (SQLite-backed, a globally unique instance that acts as the source of truth). That syncs to Workers KV within seconds and replicates across the global network. The actual evaluation runs inside the edge isolate handling your request, reading from a local copy of KV.
Flags can be Boolean, string, number, or JSON objects. Targeting evaluates multiple rules in priority order (first match wins), and you can write nested AND / OR conditions up to 5 levels deep. You can also set percentage-based rollouts, using consistent hashing on an attribute like userId so the same user gets the same result across requests, letting you ramp safely from 5 % to 10 %, 50 %, and 100 %. It's a similar idea to Workers' gradual deployments.
There are 3 ways to use it. First, the Worker binding (the fastest). Just add the binding to wrangler.jsonc and call the typed accessors from your code.
{
"flagship": [
{ "binding": "FLAGS", "app_id": "your-app-id" }
]
}
const showNewUI = await env.FLAGS.getBooleanValue('new-ui', false, {
userId: 'user-42',
plan: 'enterprise',
});
You get getBooleanValue / getStringValue / getNumberValue / getObjectValue, plus Details variants (like getBooleanValueDetails) that also return the value, the variant, and the match reason.
Second, the OpenFeature SDK (for portability). It's built on the CNCF OpenFeature standard, so you can swap implementations by changing one line of config and avoid vendor lock-in. Third, a client-side option (browser) that pre-fetches flags, caches them with a configurable TTL, and serves evaluations synchronously.
To set up, create a Flagship app in the dashboard and install the SDK with npm i @cloudflare/flagship. For details, check the documentation and the source code. You can request private beta access here. Pricing hasn't been disclosed yet; the team says details will come before general availability.
Wrap-up
- Flagship is a feature flag service that runs natively at Cloudflare's edge (currently in private beta).
- Evaluation is fully at the edge, so it's sub-millisecond with no external calls, with both data and logic living at the edge.
- The flow is control plane → Durable Object → Workers KV → isolate evaluation.
- It supports Boolean / string / number / JSON flags, nested conditions, and percentage rollouts.
- There are 3 ways to use it: Worker binding, OpenFeature SDK, and client-side.
- It's a great fit for engineers wrangling flags on Workers, and for teams that want AI agents to ship code safely!