Feature Flags
Technique enabling activation or deactivation of features in production without deploying new code, enabling progressive releases and experimentation.
seed#feature-flags#toggles#releases#experimentation#progressive-delivery
What it is
Feature flags (or feature toggles) are conditionals in code that allow activating or deactivating features without deploying. They separate code deployment from feature release.
Types
| Type | Duration | Use |
|---|---|---|
| Release | Temporary | Gradually activate feature |
| Experiment | Temporary | A/B testing |
| Ops | Permanent | Circuit breakers, kill switches |
| Permission | Permanent | Features by plan/role |
Benefits
- Deploy code without activating features
- Instant rollback (deactivate flag)
- Canary releases (activate for % of users)
- A/B testing in production
Tools
- LaunchDarkly, Split.io (SaaS)
- Unleash, Flagsmith (open-source)
- AWS AppConfig, CloudWatch Evidently
Risks
- Technical debt: flags that never get cleaned up
- Complexity: flag combinations hard to test
- Inconsistency: different state between users
Why it matters
Feature flags decouple deploy from release. They allow deploying code to production without activating it for users, enabling features gradually, and reverting changes without code rollback. They are the safety net that makes continuous deployment possible.
References
- Feature Toggles — Pete Hodgson, Martin Fowler.
- LaunchDarkly — LaunchDarkly, 2024. Leading feature management platform.
- OpenFeature — CNCF, 2024. Open standard for feature flags.