Deploy is not release
A feature flag is a runtime switch that decides whether a code path is active. It separates deploy, which puts code on servers, from release, which exposes behavior to users. With flags you can ship a feature turned off, then enable it for a few users without a new deploy.
What flags buy you
- Gradual rollout: enable a feature for one percent of users, then ten, then everyone.
- Instant kill switch: turn a broken feature off in seconds instead of rolling back a deploy.
- Targeting: enable a flag for internal staff or one region first.
The cost of flags
Flags are technical debt if they live forever. Each flag is a branch in the code that must be tested in both states. The discipline is to remove flags once a feature is fully launched, keeping only long lived operational flags.
Key idea
Feature flags separate deploy from release, enabling gradual rollout and instant kill switches, but stale flags must be cleaned up.