Feature flags (feature toggles)
What it is
Feature flags (feature toggles / switches) are configuration switches in code that let you turn a feature on or off at runtime — without redeploying. The code is shipped to production with the feature present but dark; a flag controls whether users see it. In Azure, Azure App Configuration provides managed feature-flag management.
Why it exists
They decouple deployment from release: you can deploy code (which is technically live) but only release the functionality when you choose. This enables dark launches, trunk-based development on short-lived branches, instant kill-switch rollback (turn the flag off instead of redeploying), and per-audience rollouts.
Key ideas
- Deploy ≠ release: code ships always-on ready; the flag determines when and to whom the feature is visible.
- Kill switch: disabling a flag is the fastest possible rollback — no redeploy, no downtime.
- Audience targeting: flags can vary by user, ring, percentage, or environment — powering ring and canary rollouts and gradual rollout percentages.
- Safe defaults: a flag should default to off for a new feature (or to a safe value) so a misconfig doesn’t expose it.
- Flag hygiene: remove flags once the feature is fully rolled out — dead toggles are tech debt and a risk.
- Azure App Configuration centralizes flags with .NET/Java/other SDKs and
Microsoft.FeatureManagement.
How it fits
Feature flags are a release-mechanism used inside a release strategy to expose functionality gradually and to provide a fast rollback path independent of the deployment pipeline.
Exam notes
- Feature flags let you release functionality without a deployment — the strongest differentiator vs other patterns.
- Best known for kill-switch rollback and progressive/percent rollouts and per-ring targeting.
- Remember flag cleanup and safe defaults; know that Azure App Configuration is the managed home for flags.
Related
release-strategy · deployment-ring · canary-deployment · rollback-strategy · release-definition
📘 Source: Microsoft Learn — Feature Flags