Skip to content
BENIBIX Learn

Feature Flag vs Rollback

People think turning off a feature flag is a rollback, and it is not. A rollback puts the whole last version back on the servers, which takes a minute or two. Turning off a flag hides one feature in seconds and leaves the rest of the deploy in place. Use the flag when one feature is the problem, and roll back when the whole deploy is.

Development☁️ DevOps & Cloud

Feature Flag

A switch in your code. It turns a feature on or off with no deploy.

A feature flag is an on and off switch in your code that hides or shows a feature. The new code ships switched off. You can then turn it on for your team, then for 10 percent of users, then everyone. If it goes wrong, you flip it off in seconds. Old flags should be removed, or the code fills up with dead switches.

Example
Emma ships a new search page behind a flag. She turns it on for staff only, finds a bug, fixes it, and then turns it on for everyone.
Why it matters
It splits shipping code from turning it on. You can deploy any time and release when it suits you.
Full entry
Development☁️ DevOps & Cloud

Rollback

Put the last version that worked back after a bad deploy.

A rollback puts the previous working version back after a bad deploy. Instead of fixing the bug while users suffer, you return to what worked. Then you fix the bug calmly and ship again. A good rollback takes one command and a minute or two. It only works if the old build is still saved and the data still fits it.

Example
Jack's new release doubles the error rate. He runs one command, the old version is back in 40 seconds, and he fixes the bug after lunch.
Why it matters
Fast undo makes shipping less scary. Teams that can roll back in a minute are happy to deploy often.
Full entry

In one line

Feature Flag
A switch in your code. It turns a feature on or off with no deploy.
Rollback
Put the last version that worked back after a bad deploy.