Deploy is not release
Key takeaway: Ship code to production behind a flag that is off, then turn the feature on for users as a separate, reversible step.
Deploy and release are two different events. A deploy puts a new build on your servers. A release turns on new behavior for users. LaunchDarkly posted about the tension between deployment velocity and managed risk, and my three-word reply was: deploy != release.
When the two are welded together, every deploy carries product risk, so teams deploy less often. That makes each deploy bigger, harder to debug, and harder to roll back. So deploying less to lower risk actually raises it.
A feature flag pulls them apart:
if Flags.enabled?(:new_checkout, user)
NewCheckout.call(cart)
else
LegacyCheckout.call(cart)
end
The new checkout deploys with the flag off. It’s in production and nobody sees it, so the deploy is boring. Half-finished work can land on main behind a flag, which means no long-lived branches. Then release on purpose: employees first, then 1%, 10%, 50%, everyone, watching errors, latency, and the metric the feature is supposed to move.
When a release goes wrong, turning off a flag takes seconds. A rollback takes a full pipeline run, reverts everyone else’s changes too, and sometimes can’t happen because a migration already ran.
Flags do pile up as debt, though. Ten flags give you over a thousand combinations nobody has tested. In 2012, Knight Capital reused an old flag for new trading code, one server never got the new deploy, and the firm lost hundreds of millions of dollars in under an hour. Give each flag an owner and an expiration date, and delete it once the release has sat at 100% for a week.