Feature Flag
A feature flag (also called a feature toggle) is a runtime switch that turns a code path on or off without deploying new code. Flags let teams decouple deploy from release, ship dark, run experiments, and roll back broken features without rolling back binaries.
Common kinds of flags
- Release flags. Gate a new feature; flip on when ready to ship.
- Experiment flags. Route users to A/B variants for measurement.
- Ops flags / kill switches. Disable an expensive or buggy code path instantly during incidents.
- Permission flags. Expose preview features to specific accounts, plans, or roles.
Common targeting rules
- Percentage rollouts (1%, 10%, 50%, 100%)
- User attributes (plan, region, account age, internal staff)
- Cohorts or segments
- Sticky bucketing keyed on user ID so a user stays in the same variant
Common tools
- Hosted: LaunchDarkly, Statsig, Optimizely, Split, Vercel Flags, ConfigCat, PostHog Feature Flags
- Open source: Unleash, Flipt, GrowthBook, OpenFeature (vendor-neutral SDK standard)
🔗