Concepts

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

TypeDurationUse
ReleaseTemporaryGradually activate feature
ExperimentTemporaryA/B testing
OpsPermanentCircuit breakers, kill switches
PermissionPermanentFeatures 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

Concepts