βDeployβ and βreleaseβ used to be the same word. They should not be. Deploying code is moving bytes to a server. Releasing a feature is enabling it for users. Collapsing the two into one event means every risky change is an all-or-nothing gamble. Feature flags separate them, and the separation is where safe rollouts actually start.
#The shape of a flag check
defmodule PrismaticDD.Decision do
def run(case_id) do
if Flags.enabled?(:new_reconciliation_loop, user_id: current_user()) do
NewReconciliation.run(case_id)
else
LegacyReconciliation.run(case_id)
end
end
endTwo code paths. Both fully tested. The flag picks which one runs per user. Flip the flag off and the rollback is instant β no redeploy, no revert PR.
#The four kinds of flag
Not all flags are the same, and mixing them is how flags become an unmanaged mess:
- Release flags. βIs this feature on?β β short-lived, deleted once the feature reaches 100%.
- Experiment flags. βWhich variant does this user see?β β lives for the experiment, then deleted.
- Ops flags. βIs the degraded-mode circuit tripped?β β long-lived, controlled by ops, not product.
- Permission flags. βDoes this tenant have access?β β long-lived, part of the access control model.
Only the first two should be temporary. The last two are not flags in the rollout sense β they are permission and control surfaces. Treating them as rollout flags is how they never get cleaned up.
#Gradual rollout strategies
- Percentage β
1% β 10% β 50% β 100%over days. Simplest. Fits most features. - Allowlist β specific user ids. Use for internal testers or a single partner who opted in.
- Segment β tenants in the EU, or accounts created after date X. Use when the featureβs risk is correlated with a user property.
Every strategy needs telemetry on both the βflag onβ and βflag offβ paths so you can compare error rates, latency, and outcomes. A flag rollout without a side-by-side metric is superstition.
#The three-week rule
No flag lives longer than three weeks unless it is an ops or permission flag.
After three weeks, the flag is either at 100% (delete it + delete the old path) or it is at 0% (delete it + delete the new path). A flag left at 25% for six months is a liability β two code paths, both rotting, both claiming ownership. Kill them.
#Where to go next
- Academy: {{ cross_link(path=β/academy/learn/development-workflowβ, text=βDevelopment Workflowβ) }} β flags in the delivery pipeline
- Glossary: Feature Flag, Deployment, Rollback, Release, Telemetry
Deploy is not release. Separate them, flag the risky changes, delete the flags on schedule, and bad rollouts stop being outages.