Feature Flag Rollout Risk Planner
Calculate rollout risk, blast radius, and canary release safety. Enter values for instant results with step-by-step formulas.
Formula
Risk Score = (Complexity ร Severity ร Rollout%) / Mitigation
Risk increases with complexity and severity, and scales linearly with the rollout percentage. It is reduced by mitigation factors like unit tests, integration tests, and automated rollback capabilities.
Worked Examples
Example 1: Database Migration
Problem:High complexity (8), High severity (10), Low mitigation (3).
Solution:Rollout 10%. Risk is High.
Result:Recommendation: Reduce rollout to 1% (Canary) or improve testing.
Frequently Asked Questions
How long should a rollout take?
It depends on traffic. You need enough statistical significance to prove safety. High traffic sites might rollout in hours; low traffic might take days.
Does complexity increase risk linearly?
Often exponentially. Complex code interacts with other systems in unpredictable ways (emergent failure).
Can I use flags for A/B testing?
Yes, experimentation is a subset of feature flagging, but focuses on business metrics (conversion) rather than operational metrics (errors).
What is a 'Kill Switch'?
A feature flag used specifically as a safety mechanism to instantly disable a feature if it causes issues.
Why is 'Technical Debt' mentioned?
Every flag adds complexity. If you have 10 nested flags, testing all combinations becomes impossible. Clean them up!
Background & Theory
Calculating Blast Radius
The "Blast Radius" is the maximum potential damage a change can cause. It is a function of:
- Users Exposed: How many people see the change?
- criticality: Is it the login page (High) or a footer link (Low)?
- Data Impact: Can it corrupt database records?
Risk Mitigation Strategies
- Canary Release: Deploy to a tiny subset (e.g., 1%) and monitor error rates for 1 hour.
- Ring Deployment: Ring 0 (Devs), Ring 1 (Employees), Ring 2 (Early Adopters), Ring 3 (General Public).
- Automated Rollbacks: Use observability tools to automatically toggle the flag off if latency spikes.
Practical Tips
- Keep flags short-lived: Remove the flag once the feature is 100% rolled out. Stale flags are technical debt.
- Default to OFF: In your code, ensure the default path is the safe/old path if the flag service fails.
- Test both paths: Your CI/CD should run tests with the flag ON and OFF.
When NOT to use Feature Flags
- Database Schema Changes: Often require specific migration strategies (expand/contract) rather than simple toggles.
- Long-term configuration: Use config files, not ephemeral feature flags, for permanent settings.
History
From Big Bang to Progressive Delivery
Software deployment used to be a "Big Bang" event. The site would go down for maintenance, new code would replace old code, and everyone crossed their fingers. If it broke, the site stayed down.
The Rise of Feature Flags
Companies like Flickr and Facebook pioneered "Feature Flippers" in the late 2000s. This allowed code to be deployed but inactive ("dark launching"). This decoupled deployment (moving code to servers) from release (showing features to users).
Progressive Delivery
Today, "Progressive Delivery" is the standard. Tools like LaunchDarkly and Split.io allow granular targeting. We don't just roll out to 100%; we roll out to "Internal Users", then "Beta Users", then "1% of random traffic". This calculator helps quantify the risk at each stage.
Common Misconceptions
- Flags are just if/else statements: While technically true, the infrastructure to manage them at scale is complex technical debt.
- No risk if flag is off: False. The code is still there. Accidental activation or logic bugs can still cause outages.