Never underestimate the power of a zero-network-hop abstraction over f(feature_name, context).<p>And context can be extremely tailored to your niche: specific inventory, from a specific supplier, for a specific user of a specific B2B client of a specific business model subtype, who should or shouldn’t see certain features on that specific inventory at certain times.<p>When you can write your own logic, and just run this in a tight loop as easily and performantly as you can use a constant, it makes your business incredibly agile. Think some text might change for some customers? Just write the code to make it configurable, and you get tests and flags for free.<p>Sadly, that zero-hop setup requires a sophisticated client execution engine, which it doesn’t appear Cloudflare has implemented here. Makes sense for their memory constrained workers, less sense for traditional infrastructure.<p>Statsig has an approach here that I quite like:<p>> To be able to do this, Server SDKs hold the entire ruleset of your project in memory - a representation of each gate or experiment in JSON. On client SDKs, we evaluate all of the gates/experiments when you call initialize - on our servers.<p><a href="https://docs.statsig.com/sdks/how-evaluation-works" rel="nofollow">https://docs.statsig.com/sdks/how-evaluation-works</a><p>You can also roll your own - just sync your rulesets to a few data structures every few seconds in a background thread and atomically swap the reference to them. Then you just need a CRUD interface over the applicability ruleset dimensions.<p>Just be careful to have governance on who can play with which would-be constants. Great power and great responsibility and all that!
When reading your comment, it just reminds me on how feature flags can be misused as application configuration/customization. An antipattern i could observe at various organzations already.<p>For me feature flags go along with trunk based development to enable features in QA settings, but not on PROD yet, for PO/PM testing. Trunk based development allows for fast/easy devops, without complicated branching strategies.<p>Application configuration is, for me, part of the application and has the business context for customizing the application accordingly. Not sure if there are specific frameworks/tools out there. But one should clearly distinguish these two.
> it just reminds me on how feature flags can be misused as application configuration/customization. An antipattern i could observe at various organzations already.<p>feature flags are perfect for configuration and customization, why using them for this purpose is 'misuse' is beyond me and I've heard this claim from multiple people. they're literally configuration. feature with a flag to turn it on, off or give the flag a value. where's the misuse? is it a problem I'm not running experiments when switching over redis to valkey or whatever?
Feature flags need to be treated as short-lived and experimental otherwise they end up getting abused for everything and make it very difficult to reason about your application.<p>If it's config/customization, it should be in code. If it's experimental it can be a flag until it solidifies, and then it needs to get moved to code.<p>When I was at Shopify a couple of years ago they mandated that feature flags had to be short-lived (Like 2-4w lifetime tops, some had exceptions) because they would end up getting left in code and never cleaned up, or for extended periods of time like months. Hard to tell if it's genuinely a "feature flag" or actually just a normal part of the system at that point.<p>Feature flags being flipped in prod was also a major source of incidents, in part because people didn't treat them as experimental and with the associated risk profile of something experimental.<p>The only exception where having long-lived flags was useful and required was for operational killswitches (E.g. disable Apple Pay because it's having issues), but that is explicitly not application config.
Agreed.<p>This is the kind of design wisdom that’s both true and difficult to win an argument over.<p>It reminds me of arguments related to over-engineering and complexity. The principles are super important to having a codebase that scales and continues to be efficient to work in as the team grows, but they are hard to objectively measure.<p>Locally or in isolation something may sound like a great idea. Being able to step back and see the greater ripple effects require some experience and intuition that can’t always be used to convince people otherwise.
I disagree with just about everything you said being a problem except the process of cleaning up is absolutely required.<p>Notably feature flags triggering incidents is <i>expected</i> and <i>desired</i> vs the alternative of shipping the code and having to roll a release back because there is no other way to remove the feature from prod.
In a company the size of Shopify people flipping their feature flags would very often impact *other teams*, and like I said feature flags got abused with even seemingly innocuous changes being put behind them or being left long periods of time before being fully used.<p>When someone else flips a flag that impacts your team and they have no idea they even caused a problem, it becomes very difficult to resolve the issue. Usually you can check for recent deploys, instead you have to go and guess at which feature flag which was recently flipped could possibly be affecting your code. I experienced this several times.<p>Also, it was actually more desirable for most of these things to go straight to production. Test it properly before shipping, then when you ship it soaks on a 5% traffic canary at which point you can monitor and cancel the deploy if you see errors. That is generally safer than a feature flag rollout unless you are doing something very high impact/risk, in large part because it gives any other team affected by your rollout the ability to respond and be able to easily find the source of errors.<p>In my org it was a fairly common failure mode to ship something and accidentally cause an issue for another team. Usually it was other teams/orgs shipping things that impacted us.
Runtime evaluated feature flags can always be used for control plane levers and emergency handbrakes.<p>You just have to label them as such and prevent other teams from fiddling with them.<p>This is not an antipattern, it's just semantic hand-wringing.<p>My team managed critical systems in the online flow of billions of dollars of daily payment volume. We also wrote the feature flag system that the rest of the company used. Not only were we completely fine with feature flags as long-lived control plane levers, we heavily used the system that way ourselves.<p>You just have to clearly distinguish between ephemeral rollout flags (and clean them up or expire them) and the permanent control plane levers.<p>It's the exact same functionality for both sets of tools. Just different practices around the two usages.
One well known issue is that when you have a lot of separate feature flags that can interact, you explode the number of test cases you have to cover. For example if you have three feature flags that can interact in a module that has 100 test cases, you actually have 900 test cases if you are going to test with each possible combination of flags. Many teams don't test them all because they "already know" that doesn't apply here, and find out in production which combination of feature flags is unworkable.
> it just reminds me on how feature flags can be misused as application configuration/customization<p>They literally are configuration.
> Sadly, that zero-hop setup requires a sophisticated client execution engine, which it doesn’t appear Cloudflare has implemented here.<p>It doesn't have to be sophisticated and they don't need to implement it themselves. They piggy-back on OpenFeature where the client libraries have a simple targeting rule evaluation engine integrated.
Statsig has worked great at my work, really polished and rich feature set. Their tooling to identify unused flags as candidates for removal is neat.<p>The per-seat billing we have in our agreement is a bit rough but it's workable.
Good advice. I'll add a protip / reminder that feature flags, AB tests, and entitlements are three distinct concepts. This blog post (no affiliation) has framing I found helpful:<p><a href="https://www.stigg.io/blog-posts/entitlements-untangled-the-modern-way-to-software-monetization" rel="nofollow">https://www.stigg.io/blog-posts/entitlements-untangled-the-m...</a>
> Sadly, that zero-hop setup requires a sophisticated client execution engine, which it doesn’t appear Cloudflare has implemented here. Makes sense for their memory constrained workers, less sense for traditional infrastructure.<p>wait what? what kind of logic do you need to do that CF Workers can't do?
Could you be more specific?
[flagged]
Gold-plated booleans-as-a-service
I’ve seen whole teams at companies set up fail to provide these booleans-as-a-service well.
There are whole companies like LaunchDarkly for them.<p>If you boil it down to this, you may as well boil down every service that exists to bits-as-a-service.<p>Turns out theres legitimate business value in these things, and complexity in delivering them.
I don't mind it. I don't want to keep track of thousands of feature flags in my DB, have to create an admin dash, etc.<p>You could call any SaaS tool "excel-as-a-service" and it would hold the same power as your comment.
Getting those booleans to the right place at the right time reliably isn't trivial.
MVP
yes, worth every penny
[dead]
Looking at the docs for their JS SDK, they have this warning:<p>> The client provider requires an API token to fetch flag values. This token is not scoped to a single app, so anyone with the token can evaluate flags across all apps in your account. Use the client provider with caution in public-facing applications.<p><a href="https://developers.cloudflare.com/flagship/sdk/client-provider/" rel="nofollow">https://developers.cloudflare.com/flagship/sdk/client-provid...</a><p>Can anyone clarify... why the client SDK, designed to be deployed to browsers, requires caution? Does this mean that any client could send requests with a new targetingKey and observe other users' flags?<p>While flags probably shouldn't be critical information, this seems like an interesting design choice.
Let's think about it. This is probably something used internally at CloudFlare and someone thought I'd be interesting to make it public.<p>There is no way 6 months ago someone at CloudFlare thought it was a good idea to build a competitor to say LaunchDarkly.
Hmm not sure I necessarily agree. Cloudflare's strategy has been looking like "the only platform you need" for a while now.<p>Their recent features / announcements have been equivalent to:<p>(LaunchDarkly)<p>Resend, Firecrawl, CrewAI, Helicone, Replicate, Pinecone<p>-<p>Which like… many companies have a painful procurement process. If all you <i>need</i> is Cloudflare, and prices are within reason- why not use them
Both Cloudflare and Vercel have feature parity. Flags is a feature already in Vercel. While customer-first is a thing, it is also a no-brainer to start with: we use it, Vercel has it, let us build it.
Now waiting for Cloudflare to allow me to use Rust for serverless, real native code, not WebAssembly.<p><a href="https://vercel.com/docs/functions/runtimes/rust" rel="nofollow">https://vercel.com/docs/functions/runtimes/rust</a>
They have containers, does that count?<p>If you’re specifically thinking of native ephemeral workers with very fast startup, it seems like those would have to be sandboxed somehow, and WebAssembly seems like a decent solution. Is there really a significant native code gap between WebAssembly workers and native containers?
Containers seem to only be <i>"Available on Workers Paid plan"</i>, whereas Vercel supports it on the hobby account as well.<p>Kind of relevant on those cheapskate projects that only start paying licenses after the SOW is signed, but already expect some kind of prototyping in place.<p>WebAssembly is a solution looking for a problem outside the browser, with worse development experience.<p>If I want bytecode based runtimes, I already have them with first class development experience, and decades of deployment experience, between Erlang, JVM and CLR.
<a href="https://blog.cloudflare.com/flagship" rel="nofollow">https://blog.cloudflare.com/flagship</a><p>Here's why we built it!
><i>Agentic coding tools like OpenCode and Claude Code are shipping entire features in minutes.</i><p>How many minutes do I need to wait until app-scoped tokens are live?
Ah, no-look coding.<p>How can we possibly trust the AI to disable the 'CODE_IS_SKYNET' flag.
Care to share why
Jane Wong salivating reading this
Hi! One of the engineers from the Flagship team here, app-scoped tokens are WIP.
That sounds like the product is not finished and should not be released?
"If you are not ashamed by what you are shipping, you are not shipping early enough" (Quoting from memory)
If your engineer tells you that, you're going to have a bad time.<p>I think you're thinking this:<p>> If you are not embarrassed by the first version of your product, you've launched too late. -Reid Hoffman
That’s really about creating an MVP for a startup, because too many founders stay in a cave trying to make it “perfect” before collecting valuable user feedback.<p>This does not apply to Cloudflare, especially not for an auth token that needs to be published on your website that cannot be restricted.
That's a terrible attitude for an infrastructure company. This is what private betas / close iteration with customers is for.
This has been the Cloudflare standard operating procedure for the last year or so. Non stop shipping alpha/beta products.
Is it perhaps available behind a flag somewhere?
Then it's not finished?
This is nice, but I’m still waiting for this to be delivered (which ironically is probably using Flagship):<p><a href="https://blog.cloudflare.com/enterprise-grade-features-for-all/" rel="nofollow">https://blog.cloudflare.com/enterprise-grade-features-for-al...</a><p>—-<p>I don’t believe a single enterprise only feature has made its way to lower tier (paid) account yet.<p>I’m most interested in:<p><a href="https://developers.cloudflare.com/speed/optimization/content/prefetch-urls/" rel="nofollow">https://developers.cloudflare.com/speed/optimization/content...</a>
Yes, this! I am dying for need of zerotrust enterprise features and am about to have to actually talk to one of the enterprise sales folks, which will chew up a bunch of time and add stress I’d rather avoid.
Fwiw I didn't think Cloudflare sales was too bad when we dealt with them a year ago--at least compared to some companies.
I don’t think zero trust will be anytime soon, based on this post:<p><a href="https://community.cloudflare.com/t/making-enterprise-products-available-to-everyone-share-your-feedback/914296/3" rel="nofollow">https://community.cloudflare.com/t/making-enterprise-product...</a>
I've never understood feature flags. How are they fundamentally different to a Boolean in a database?
The flags (whether they be booleans, strings, numbers, or anything else) are the trivial part. It's the targeting and rollout rules (i.e. who gets to see which flags), and the requirements for extremely fast and consistent evaluation of these rules, that can get surprisingly complicated fast, and folks who have rolled their own usually find that product management or marketing or sales wants to target using more complex rules, and the problem balloons.<p>I agree that problem is not particularly <i>hard</i> in the grand scheme of things, but it is actually quite <i>big</i>, meaning it requires a lot of features that aren't obvious at first glance.<p>Edit: Thought of another analogy that may help explain the complexity. At their heart, feature flags are really a <i>permissioning system</i>: only certain users get access to certain pieces of functionality. Anyone who has ever dealt with permission systems know how complex they can be: group membership, including hierarchical groups, roles, ACLs, etc. All of those things are really analogous (actually, a subset really) to the various types of targeting rules that can be used in a feature flags system.
Percentage rollouts, RBAC, audit history, A/B testing, multivariate - it gets complex quick. That boolean turns into a whole system you have to maintain and operate.
Here's one detailed blog about it: <a href="https://martinfowler.com/articles/feature-toggles.html" rel="nofollow">https://martinfowler.com/articles/feature-toggles.html</a>
They're not always booleans - for example, we often see feature flags being used for A/B rollouts.<p>Cloudflare themselves even uses them internally as such, by shipping new features/builds to their free customers first, and then progressively larger customers after a settling period.<p>Feature flags can also be randomly turned on, for a sort of fuzz testing. Don't think of them just as 'new things' - it could be 'changed behavior'.<p>I guess you could think of them as a boolean on every client but they're generally not implemented that way.
Really any "constant". Failure thresholds, timeouts, API versions or endpoints, LLM model id
This is just an implementation detail, a feature flag can very well be implemented with a Boolean in a database.<p>To me the main appeal of feature flags is that they allow to work on large features that often require months and many commits to finish in a main branch. This, at least to me, results in a more lightweight and more iterative development process. This contrasts with maintaining a separate branch, with perhaps separate deployment target for a large in-development features.
efficient delivery of the single bit (and especially the flip event) to the desired audience is the use case. the actual payload almost doesn't matter as long as it's reasonably small.
These are booleans with a bit more context. They may only apply to a particular geographic area, and may have dependencies: if we turn off flag X, we automatically turn off flag Y.
It's the tooling around them.<p>How do you set a boolean to only return true for queries to 5% of the fleet? And which 5% of the fleet? And then ramp up on a predefined cadence? Or how about returning true only for customers in the preview group for the feature? Does the database return false automatically if the 5% of the fleet where it's true start crashing or throwing exceptions? Does it hook into your observability stack?<p><i>Fundamentally</i>, sure, you could just implement it as a boolean in the database. It's the integration and tooling that works with the rest of your stack that makes it worthy of the name "feature flag".
That’s all it is. This only exists to lock you into cloudflare even more.
Then why did they deliberately make it compatible with Open Feature, explicitly making it easy to swap out a different Open Feature provider?<p>Oh, that's right, you just spouted a "big company bad" mantra without bothering to read the article. Look, I know saying RTFA goes against the HN guidelines, but the amount of increasingly lazy spew i see from folks (or bots) who haven't bothered to read the article is so tiresome and annoying.
Cloudflare are winning these days, they’re just lacking good fine grained permissions. You still have to make an entirely separate account for prod, which messes up SSO since one domain can only be bound to one account.
Their products are cool and I've been happy with them over the years, but their blog right now has had some blunders recently. Also their reliability seems to have been having trouble but does seem better recently.
Yes! I just opened a support case today asking for more fine grained permissions.
After years of AWS I gave Cloudflare a whirl and loved the UX but ultimately retreated back due to the same concern. They are so close though..
Not sure what they are winning .. we kept them as a backup but they are so bad that they fail even there
This is exactly what stops me from using them for real work. I love their free tier for my hobby stuff.
Yep I made the switch a couple of years ago for all of my projects and never looked back. Workers, D1, R2, queues, containers, KV<p>Still using AWS for email sending so that will be great when it comes
It already came if you use workers I believe, still in beta though. I would love to switch to it but I still need the SMTP interface though. <a href="https://developers.cloudflare.com/email-service/" rel="nofollow">https://developers.cloudflare.com/email-service/</a>
E-mail sending is in beta afaik, you need the Workers paid plan to use it.
Will never use them without prepayment or spending limit options. Insane to be a bug, attack, or misclick away from 6-7 digit invoice
the CTO of Cloudflare (hn: dknecht) said:<p>> It is in the works. The billing team has been sprinting to fix a lot of debt in this area. I don’t have a date.<p><a href="https://x.com/dok2001/status/2051220429973389622" rel="nofollow">https://x.com/dok2001/status/2051220429973389622</a>
Their pricing is not ridiculous like some providers. It would be very hard to rack up that kind of bill, especially considering their rate limiting rules are now <i>free to use</i>.
Just let everyone have access to prod?
One account gets compromised and your doomed. A lot of companies even have prod access be a request based system. Most modern security models with zero trust don't let everyone have access to everything, quite the opposite.
Poor access and change management governance.
hooboy that was a good one!
OpenFeature was new to me, neat! Anyone have experience integrating this? <a href="https://openfeature.dev" rel="nofollow">https://openfeature.dev</a>
I have had a lot of experience with OpenFeature, and have early commits in a few of the client libraries. It's definitely the future of feature flagging, and the ecosystem is really growing.<p>Full disclosure, I am the CTO of Flagsmith, and we have seen a clear curve in adoption of OpenFeature over the last few years. It used to be that we were pushing customers to try it out, now they come to us with OpenFeature as a requirement.<p>The vendor support is pretty mature now and there is coverage across almost all languages. If you're integrating feature flags into a new service, or looking to migrate from e.g. home-grown to a third party solution, OpenFeature is definitely the way I would recommend going.
It’s pretty useful. We used it at a previous company. We built a custom backend, but used the spec and SDKs.<p>It took like 2 weeks to build a full custom backend. SDKs across languages worked flawlessly (okay, we did find one bug, reported it, and it was fixed within the day)
Feature flags are often ridiculously over engineered.<p>Check a config, bdd value, env var to dynamically go one path or the other.<p>That’s all, you must either have a small feature or refactor the code to easily switch at a high level.<p>If you are not able to do so easily, then yes, complex feature flags implementations might help you, to coordinate feature activation between micro services.<p>Or if you have many features then a dashboard might be useful.<p>But I would argue that both are serious indicators that you should avoid feature flags, they are better for local and temporary changes, otherwise the complexity compounds and it become hard to manage and maintain.
There's an argument to be made for being able to turn on a feature for a certain segment (e.g low revenue users in Italy) so you can see what the business/performance impact is.<p>Ofcourse you don't want users to lose the feature once they exceeded your revenue threshold or cross the border so you'll need to implement some kind of tracking. Your analytics and error tracking also needs to communicate with the feature flag service.<p>Definitely not rocket science but more complex than a environment variable.
Enterprise software is full of this kind of stuff. Half our customers are on year old UI's because they don't want to re-up contracts yet.<p>That is, features are contractual and when you've only got 50 customers but they're all paying high 6 figures does anyone really care about feature flag complexity?
<i>There's an argument to be made for being able to turn on a feature for a certain segment</i><p>Not just an argument, it's the entire point of feature flags for ui experiments which is an essential practice. Dynamic adjustment of the cohorts (or even just an immediate kill switch if it's a disaster) is required.
The main thing about feature flags is discipline: create them purposefully, remove them as soon as they don't add value any more. KISS applies.
I’m always excited when Cloudflare starts offering things that I had to use other providers for because I know it will be solid.<p>We used Statsig at Function. It started out as 2 of us using it on one product and within 12 months, large amounts of our product copy and rollouts were driven off of it.<p>Statsig has client side evals so you can write rules and rollouts based on internal concepts without Statsig’s servers processing a piece of user data. Hoping Cloudflare can build a sophisticated product here so I don’t have use another product in the future!
I'm out of my league on this discussion, but it reminds me of the Configuration Database (CDB) used for most modern aircraft.
i see @btown's comment below but also just for education about this space:<p>- anyone have comments/comparisons about launchdarkly vs posthog vs statsig (is it still alive after openai?) vs _____ vs cloudflare flagship?<p>like a "beginner/intermediate/advanced" progression of what to look out for/what you will want when it comes to feature flags would be highly helpful for me and many others here
A bit tangent but related: These things I'm never sure if I should be shipping on day one with mobile apps (Flutter in particular): Flagships, bug gathering, A/B testing ?<p>I feel strong inclination too but its also way too early before any real users can prove PMF. I've been using Google stuff but wonder if Flagship and perhaps other Cloudflare offerings can help.<p>The other side is that again it feels too early for this stuff and I just want to ship something quickly.<p>The work ivnvolved
Worth noticing a Vercel equivalent: <a href="https://github.com/vercel/flags" rel="nofollow">https://github.com/vercel/flags</a>
never understood this. why follow over-engineered standard and depend on 3rd party API spec, and 3rd party vendor. if you cannot call home from your service, you having bigger problems. and once you can call home, it is just.. single json file.
More of this please: essential tools for building modern software <i>must</i> be oss; Im fine with paying for a hosted version but just the benefit of learning one tool and being able to use it everywhere (linux, k8s, python etc) is amazing.
Has anyone struggled to run their own feature flagging service? After root causing slow app starts to be caused by the equivalent offering from Firebase, I've been cautious to use any off the shelf solutions
Anybody and everybody could use a mature LaunchDarkly alternative.
Missing gradual rollout of feature flag changes themselves. Yes, you can do percentage based rollouts for individual features but still should have ability to canary all changes before they cause an insta-sev.
I would happily pay for safely-remove-old-feature-flags-from-the-code-as-a-service.
Fix your stupid Turnstile that blocks humans first. You are gatekeeping the whole Internet. Even Anubis works better than the Clownflare garbage.
this make perfect sense for cloudflare.<p>and im sure they can drive down the cost , compared to say launchdarkly
Am I the only one worried about Cloudflare becoming too powerful?<p>We went through this with E-mail: we slept through the period when Google, Microsoft and AWS were growing, and we ended up with them dictating the terms. Today I get 90% of my spam from Google, Microsoft and AWS and they don't care: they can safely ignore spam reports, because at this point they are Too Big to Block.<p>I have a feeling we are moving towards the same problem with Cloudflare and the web. Tomorrow Cloudflare will start dictating what we can or cannot do and we will not be able to do anything about it. This has already begun: their arbitrary "bot-filtering" for example.
Cloudflare is already too powerful, their anti DDOS solution is just too good. But their serverless products/features don't really build on that, they are just another hosting company.
> Am I the only one worried about Cloudflare becoming too powerful?<p>No, it gets brought up in every single thread about cloud flare. And if this wasnt a feature release that people seem to like, the top comment would probably be talking about how cloudflare is terrible for the internet.
I don’t have experience with the tools Cloudflare has been shipping this year so I can’t speak about the quality, but they have really been pushing out a lot new products and services, no doubt due to agentic coding.
I love their free tier but for playful stuff
is it similar to vercel flags?
a flagship with no pirates, all fired due to ai.
This is what "Building for the future" looks like post-layoffs, huh?<p>Can't even ship with app-scoped tokens...
I like the name
If anyone is interested, you can implement something like that with a few lines of code on the front end. We expose a function that generates a uniformly-distributed hash that you can use for A/B testing and other uses:<p><pre><code> Q.Data.variant()
</code></pre>
<a href="https://github.com/Qbix/Q.js/blob/main/src/js/Q.minimal.js#L9842C2-L9858C3" rel="nofollow">https://github.com/Qbix/Q.js/blob/main/src/js/Q.minimal.js#L...</a><p>And on the back end, you'd use it like this:<p><a href="https://github.com/Qbix/Platform/blob/main/platform/classes/Q/Data.php#L607" rel="nofollow">https://github.com/Qbix/Platform/blob/main/platform/classes/...</a><p>Essentially, this can support a huge number of "variants" and within each variant you can have N equal segments. That will help you do A/B testing and flipping features on or off.
[flagged]
[flagged]
Feature flags are so ridiculously simple I have never needed to outsource this to someone else.
[dead]
[dead]