So why do I like feature flags?

It can be valuable to expose it to a small subset of users. Perhaps a single user.

Yesterday I said that feature flags aren’t about continuous deployment… but that I also love feature flags. So why do I like them, if not for continuous deployment?

Let me first say that feature flags come in a number of flavors. The simplest possible feature flag looks like this:

if (false) {

Yeah. Just a hard-coded if (false) can get you pretty far, in terms of disabling incomplete functionality.

The next step up from there is probably an environment variable or some config flag.

As you continue up the sophistication ladder, soon you have feature flags with the ability to control not only whether the feature is enabled or disabled, but for whom it is enabled or disabled. And this is where I find feature flags to be very powerful.

Once your feature is complete (or maybe merely nearly complete) it can be valuable to expose it to a small subset of users. Perhaps a single user. This can allow you to get feedback on a new design, for example, without risking the wrath of all your users, if the new design is hated.

And once you’re using a flagging framework or SaaS with this capability, you’re just a hair away from A/B testing. Once your new feature is polished, based on the feedback from one or two users, you can expose it to half your users, and see how they behave compared to the other half on the old design.

“Yeah, but we don’t really care about SEO and optimizing funnels.”

That’s cool. Maybe A/B testing isn’t for you.

But, consider this. When I worked at Booking.com, we ran A/B tests for virtually everything. Including changing database queries.

“WTF? Why would anyone…”

Their A/B testing tool reported much more than user behavior. It reported CPU and memory utilization on a per-request basis, page load times, database latency, and many other things.

Imagine. If you could rewrite a backend function, then run it for half of your users, and use the old one for half of your users, and see if there are any surprise performance differences… would that be worth something to you?

It adds a whole new dimension to the normally SEO-centric A/B testing world, which I think can be pretty valuable in certain situations.

I’m curiuos what you think. Any surprising uses of feature flags or A/B testing you’ve seen?

Share this