What is a Feature Flag?

A feature flag (also called a feature toggle) is a software development technique that allows teams to enable or disable specific features at runtime without deploying new code. Feature flags decouple deployment from release, giving product teams precise control over who sees what and when.

Why It Matters for Product Managers

Feature flags give PMs superpowers for managing risk and running experiments. Instead of launching a feature to everyone at once and hoping for the best, you can roll it out to 1% of users, monitor key metrics, and gradually increase exposure. If something goes wrong, you can instantly turn it off without an emergency code deployment.

Feature flags also enable targeted releases. You can launch a feature to beta users, specific customer segments, or internal employees first, gathering feedback before a broader rollout.

Common Use Cases

Teams use feature flags for gradual rollouts (canary releases), A/B testing, beta programs, kill switches for risky features, subscription-tier gating, and regional launches. The key is to clean up flags once a feature is fully launched to avoid technical debt from accumulated stale flags.

Practical Example

A PM launching a new recommendation algorithm uses a feature flag to show it to 5% of users initially. After confirming that engagement metrics improve and error rates stay flat, they increase to 25%, then 50%, and finally 100% over two weeks. If the algorithm had caused issues, a single toggle would have reverted all users to the original experience.

Related prompt: Feature Flag Implementation Strategy