Software → quality-assurance
Feature Flag
A runtime switch that enables or disables behavior without requiring a new deployment.
Motivation
A Feature Flag separates deployment from release. Teams can deploy code in a disabled state and enable it later for selected users, environments, or traffic segments.
Common uses
- Progressive delivery and canary releases.
- Kill switches for risky functionality.
- Experiments and controlled rollouts.
- Trunk-based development with incomplete features hidden.
- Operational configuration that can change without redeployment.
Flag lifecycle
Define ownership, targeting rules, observability, an expiry or removal date, and safe default behaviour. Temporary flags should be removed after rollout to avoid permanent branching complexity.
Common mistakes
- Leaving stale flags in the codebase.
- Testing only one combination of many interacting flags.
- Using flags for secrets or authorization decisions without proper security controls.
- Changing a flag without monitoring the outcome.