Glossary
Feature flag
A configuration switch that turns a piece of functionality on or off, or for specific users, without deploying new code.
Also called: feature toggle, feature switch
A feature flag is a conditional switch in code that controls whether a piece of functionality is active, checked at runtime rather than requiring a new deployment to change. The same flag can be set globally, on or off for everyone, or targeted, on for a specific percentage of users, a beta group, or a single account, using values read from a configuration service rather than hardcoded logic.
Flags are the underlying mechanism most modern A/B testing platforms use to assign users to a variant: a flag targeting rule splits traffic between "on" and "off," or among several variant values, and the experimentation layer measures the outcome difference. The same infrastructure also supports gradual rollouts, shipping a feature to 1% of users, then 10%, then everyone, while watching guardrail metrics, and instant kill switches, turning a feature off immediately if it causes problems, without a code rollback.
Feature flags matter operationally because they decouple deploying code from releasing a feature to users, which reduces the risk of any single release and enables experimentation without separate infrastructure. The common pitfall is flag debt: flags left in code long after a decision has been made, accumulating until the codebase carries paths for variants nobody uses anymore and nobody remembers why they exist.
Last reviewed September 22, 2026