Engineering
Feature Flag
Also known as: Feature toggle
A feature flag (or feature toggle) is a configuration mechanism that allows a piece of application functionality to be enabled or disabled — often for specific users, percentages of traffic, or environments — without requiring a new code deployment.
The core benefit is separating two decisions that deployment alone conflates: shipping code to production, and making a feature visible to users. New functionality can be deployed dark (flag off), verified safe in production, then gradually rolled out by flipping the flag for an increasing percentage of traffic — without a second deployment.
Flags are also the standard mechanism for A/B testing and canary releases: a small percentage of users see a new code path while the rest see the existing one, letting teams measure impact or catch problems before a full rollout, and instantly roll back by flipping the flag rather than reverting a deploy.