What do feature flags let you do?
Options
- Speed up the builds by skipping the modules that did not change
- Separate deployment from release: ship the code off, enable it later (Correct option)
- Replace the tests with checks that are run on the live system
- Encrypt the traffic that moves between the services of the app
Answer
Decouple deployment from release: ship code dark, enable it gradually or per user, and turn it off without redeploying
Why
A feature flag is an if-condition controlled by configuration: if flags.enabled("new_checkout", user): ....
You can deploy unfinished code switched off, then enable it for staff, then 10% of users, then everyone. If something goes wrong, switch it off in seconds without a new deploy.
Remove old flags once a feature is fully released.
Remember
Feature flag = deploy now, release when ready, off switch included.