What is a feature flag and how does it decouple deployment from release?

Neil Millard

A feature flag is a configuration option in your code that is checked at runtime.

This 'flag' enables or disables a feature in your code. This means you can deploy the code containing the feature flag with the configuration in an 'off' state, with the feature enabled in configuration at a later time. This is particularly handy with rolling updates or frequently changing code or large releases.

The code can be deployed in a big release update, but enabled in a more controlled fashion.

A concrete example: a feature-flag service (LaunchDarkly, Unleash) or even a simple database-backed boolean both work — what matters isn't the tool, it's that the flag is checked at runtime, not baked in at build time, so flipping it doesn't require a redeploy.

Need help with your DevOps setup?

Get personalised advice from Neil Millard — DevOps consultant based in Weston-super-Mare.