Feature Flags as Deployment Strategy
Feature flags shipped right are continuous-delivery’s killer feature. Shipped wrong, they are technical debt that compounds.
Why decouple deploy from release
Deploy: code lives on prod. Release: users see the change. Without flags, the two happen together; with flags, they decouple.
Decoupling enables: ship dark; ramp gradually; kill instantly; A/B test.
The four-flag taxonomy
- 1. Release flag. Wraps a new feature; toggles per user/segment/percentage.
- 2. Operational flag. Kill switch for risky features.
- 3. Permission flag. Gates by entitlement.
- 4. Experiment flag. A/B test infrastructure.
Per-type lifecycle
Release flags: 30-90 days lifespan; remove after full ramp.
Operational flags: indefinite; reviewed annually.
Permission flags: tied to product roadmap.
Experiment flags: lifespan = experiment duration; remove on conclusion.
Cleanup discipline
Each flag has expiry tagged at creation. Quarterly: report on flags past expiry; remove or rationalise.
Without expiry discipline, flags accumulate; flag count exceeds 100 in 6 months.
Antipatterns
- Flags without expiry. Debt compounds.
- Permission logic in release flags. Wrong flag type.
- Flag everything. Configuration becomes the codebase.
What to do this week
Three moves. (1) Apply this to one pipeline first. (2) Measure deploy frequency / MTTR before/after. (3) Document the outcome so the next team starts from data.