m@ksim.pro
Back to all posts
IT 4 min read

Feature flags: how incremental delivery reduces release risk

What feature flags are, why teams that use them release faster and break things less, and what an owner or manager needs to know before adopting them.

There is a pattern I see repeatedly in growing product companies. The team has learned to ship frequently, but each release is still an anxious event. Everyone knows that a bad deploy on Friday afternoon can ruin the weekend. So releases accumulate, batches grow, and at some point the company is back to shipping once a month and calling it "stability."

Feature flags are one of the cleanest solutions to this problem. They are also frequently misunderstood by people who have not used them - or adopted only halfway and then blamed for complexity they did not actually cause.

What a feature flag is

A feature flag is a conditional in the code that wraps a feature: "if this flag is on, show the new behaviour; if it is off, show the old one." The flag is controlled from outside the codebase - typically from a configuration service or a simple database entry - without redeploying.

This means you can deploy code that contains a new feature, leave the flag off, and turn it on later - for all users, for a percentage, for a specific account, for internal testers only. The deployment and the release become two separate events.

Why this matters operationally

When deployment and release are separate, several things change:

Rollback becomes cheap. If something goes wrong after you turn on a flag, you turn it off. No hotfix, no rollback deploy, no incident call at 2 am. The code is still there, the feature is simply invisible.

Gradual rollout becomes possible. You can turn a feature on for 1% of users, watch the error rates and support tickets, then increase to 10%, 50%, 100%. Problems surface at a scale where they are still easy to handle.

Testing in production becomes safe. Internal teams can use a feature for weeks before any customer sees it. The feedback loop is real - staging environments lie in ways that production does not.

The cost side

Feature flags are not free. The main costs are:

  • Flag debt. Flags that are not cleaned up accumulate. After a year you have dozens of conditionals in the code, some of which nobody is sure are still needed. This requires discipline: every flag should have a ticket to remove it once the rollout is complete.
  • Testing complexity. With N flags, you theoretically have 2^N combinations. In practice most combinations are not real concerns, but you do need to think about which ones are.
  • Operational dependency. If the service that serves flag values goes down, you need a defined fallback. Usually this means "safe default" values baked into the code.

What the management layer needs

From a management perspective, the key things to agree on before rolling out a flagging system:

  1. Who can create and modify flags - and in which environments.
  2. What the lifecycle of a flag is: created, active, full rollout, removed. Every flag moves through this and is removed at the end.
  3. How flags are named, so six months later anyone can tell what a flag does from its name.
  4. What "percentage rollout" means for your user base - is it per user, per account, per session?

The mechanics are simple enough that any reasonably experienced engineering team can build a basic version in a few days. Commercial solutions (LaunchDarkly, Unleash, Flagsmith) add audit logs, targeting rules, and metrics integrations that are worth the cost once you have more than a handful of active flags.

The bigger picture

Feature flags are a symptom of a healthy delivery culture - one where "done" means "in the hands of users, monitored, with a way to reverse it quickly." That culture change is bigger than any specific tool. But the tool makes the culture easier to maintain under pressure.

Back to all posts
Contact

If this resonated, write to me. I reply personally.

WhatsApp