Mara logo

Feature Flag

A switch that turns functionality on or off at runtime, separating deploying code from releasing a feature.

Development & Platforms

A feature flag lets code ship dark and be turned on later — for a percentage of users, a named account, an internal team. That decoupling is what makes continuous deployment safe: an incident becomes a flag flip rather than a rollback, and a risky change can be exposed to 1% of traffic first. It is also the mechanism behind most A/B testing and per-customer entitlement.

The cost is that flags accumulate. A codebase with 200 live flags has 2^200 nominal states, almost none of which are tested, and behaviour nobody can reason about. The discipline is an expiry date on every temporary flag and a standing process to remove them once the rollout completes. Distinguishing temporary release flags from permanent entitlement flags at creation is what stops the two piles merging into one nobody dares touch.

Flags are a design surface too

Two users on the same plan can see different interfaces. Support needs to know which flags an account has, and documentation and screenshots drift from what any given customer sees.

In practice

A team accumulated 180 flags with no removal process. A support escalation took three days to reproduce because the customer's combination of eleven flags existed nowhere else. Adding mandatory expiry dates and a flag list in the admin view cut live flags to 40 over a quarter and made escalations reproducible.

Where teams get it wrong

  • No expiry or removal process, so temporary flags become permanent.
  • Not distinguishing release flags from entitlement flags.
  • Support with no visibility of which flags an account has.
  • Nested flag conditions producing states nobody has tested.
  • Documentation and screenshots that match no actual customer's configuration.

Learn more

You may ask

Frequently Asked Questions

What is a feature flag used for?

Separating deployment from release — shipping code disabled, then enabling it for a percentage of users or specific accounts. It underpins gradual rollouts, instant kill switches, A/B testing and per-plan entitlements.

Why are feature flags a problem over time?

They accumulate. Each one multiplies the number of possible states, most of which are never tested, and support loses the ability to reproduce what a customer actually sees. Expiry dates and removal are what keep them useful.

Related terms

All terms

Defined by Mara Last reviewed .

Let's talk about your product.

Happy to look at what you're building and say where design would move the needle.

Contact Us