Decouple deploy from release: flag types and lifecycles, deterministic percentage rollouts, evaluating flags without flicker, canary releases with automatic rollback, and keeping flag debt under control.
In many teams, deploying code and releasing a feature are the same event: merge, deploy, and everyone gets it. Any bug hits 100% of users at once, and the only fix is another deploy.
Feature flags separate the two. Code ships dark, behind a flag. Releasing becomes a configuration change that can be targeted, gradual, and reversed in seconds without a deploy.
Kinds of flags (they have very different lifecycles):
| Type | Purpose | Lifetime | Who changes it |
|---|---|---|---|
| Release | Hide unfinished work, roll out gradually | Days to weeks | Engineering |
| Experiment | A/B tests | Weeks | Product / data |
| Ops / kill switch | Turn off an expensive or failing feature under load | Long-lived | On-call |
| Permission / entitlement | Plan- or role-based access | Permanent | Product |
Treating them all the same is a common mistake. Entitlements belong in your authorization model, not a release-flag tool. Release flags must be removed after rollout, or they rot into permanent, untested branches.
Trunk-based development depends on flags. Everyone merges small changes to main daily, and incomplete features stay off. Long-lived feature branches and painful merges disappear.