What is a Feature Flag?

Last updated: July 29, 2026

Definition

A feature flag is a software development technique that enables teams to control functionality at runtime without deploying new code. Feature flags act as dynamic on/off switches in the application code, allowing organizations to deploy continuously while controlling when and to whom features become visible. Development, operations, and product teams use feature flags to reduce deployment risk, enable progressive rollouts, and test features in production environments before full release.

Key Facts

  • Also known as: Feature toggles, feature flippers, feature switches
  • Category: DevOps & Automation
  • Related standards/protocols: No formal standards (industry practice patterns)
  • Key vendors/implementations: LaunchDarkly, Optimizely, Unleash (open-source), Split, ConfigCat
  • First defined/standardized: Emerged in continuous delivery movement, mid-2000s

How Feature Flags Work

Feature flags operate through conditional statements embedded in application code. When the application runs, it checks the flag's state from a configuration source and executes different code paths based on whether the flag is "on" or "off." Teams can change feature visibility by updating the configuration without redeploying code.

Organizations categorize flags into four types. Release toggles hide incomplete work and live for days or weeks. Experiment toggles support A/B testing and persist until results reach statistical significance. Ops toggles function as kill switches, disabling problematic features instantly during incidents. Permissioning toggles control access based on user tiers and often remain in codebases for years.

Modern platforms deliver flag state updates in under 200 milliseconds. They enable percentage-based rollouts (10% of users, then 25%, then 50%), user cohort targeting (specific customer segments), and instant rollback when issues surface.

Why Feature Flags Matter

Feature flags reduce deployment risk by separating code deployment from feature release. Organizations adopting continuous delivery practices can release code 2x faster than before (GitLab, 2024). This speed comes from eliminating the tradeoff between deployment frequency and stability. IT service delivery teams deploy dark code to production, then activate features gradually rather than risking full exposure immediately.

For businesses with limited IT staff, feature flags prevent the scenario where a bad release requires emergency rollbacks affecting all users. A single toggle disables the problematic feature while the application continues running. This capability matters when downtime translates to lost revenue or when one IT person manages releases without dedicated DevOps support.

Feature Flags vs. Blue/Green Deployment

AspectFeature FlagsBlue/Green Deployment
Primary functionControl feature visibility at code levelSwitch traffic between two infrastructure environments
ScopeIndividual features within deployed codeEntire application environment
Used byDevelopment, product, and ops teamsOperations and DevOps teams
Key differenceEnables feature-level control post-deploymentRequires full environment switch
When to useProgressive rollouts, A/B tests, kill switchesZero-downtime releases, full deployment rollback

Feature flags control individual features within deployed code, while blue/green deployments manage infrastructure-level transitions between complete environments.

Common Misconceptions

Feature flags are not temporary technical debt that should always be removed quickly. While release toggles should be short-lived, permissioning toggles controlling tier-based access often remain in production for years as permanent product features.

Feature flags do not eliminate the need for testing. Proliferating flags create combinatorial testing challenges where each flag state multiplies the number of possible application states. Organizations partnering with managed IT providers must implement expiration policies and flag lifecycle management to prevent unmanageable complexity.

Frequently Asked Questions