A feature flag strategy defines how a team uses configurable switches to control which users or accounts get a feature. Flags let teams deploy code separately from exposing it. A strategy covers who gets access, how the team checks the release, what happens when a flag is turned off, and when the team can remove it.
How do rollouts and experiments use flags?
| Use | What the flag controls | What the team decides |
|---|---|---|
| Staged rollout | Which eligible accounts can use the feature as exposure expands | Whether the feature is ready for more accounts |
| A/B test | Which experience each assigned account receives | Whether the tested change affects a predefined outcome |
| Operational switch | Whether a capability stays enabled during a problem | When to use the fallback and how to recover |
A flag can deliver the variants in an A/B test. Estimating the effect still requires sound assignment, tracking, and analysis. A staged rollout can surface problems, but changes in metrics as exposure expands can also reflect changes in the audience.
Example of a staged rollout
An invoicing team releases a new preview to internal accounts, then to a small share of eligible customer accounts. Keep exposure consistent within an account so teammates working on the same invoice see the same experience. Before expanding, the team reviews preview failures and the share of eligible exposed accounts that send a first real invoice within seven days of signup. It agrees in advance which problems warrant pausing, such as a loss of draft data.
The team tests what happens if it switches back while an invoice draft is open. Check that the draft remains available in the original experience. Previously sent invoices should still appear in the customer’s history. Plan a separate recovery path for changes that persist after the flag is turned off.
What should a flag plan include?
- Purpose and owner. Record the decision the flag supports and who can change it.
- Eligibility and fallback. Define the audience, assignment rules, and the default when flag configuration is unavailable. Test both experiences.
- Monitoring and response. Specify which signals prompt a pause, an expansion, or a switch back.
- Cleanup. Give temporary flags a review date. After the release decision, remove the flag and unused code path when it is safe to do so.