feature flag
A switch in the code, controlled from outside, that turns a feature on or off for chosen users without a new deployment.
In more detail
It separates deployment from release: code ships with the behaviour off and is enabled for a cohort, a percentage or nobody. Turning the flag off is the rollback. Flags add operational state, so give each an owner, an expiry date and a removal task.
Example
Spring profiles are not a substitute: switching a profile restarts the application context.Related terms
- deployment and release — Two separate decisions: deployment puts a new version on the infrastructure, release decides which users actually get it.
- cohort — A group of users who share some property, such as staff or a percentage of all users, targeted together.
- rollback — Returning a system to a previous known-good version after a bad change.
- kill switch — A control, usually a feature flag, that turns a feature off immediately without a new deployment.
- percentage rollout — Releasing a feature to a chosen percentage of users, then raising the percentage as confidence grows.
- flag hygiene — The discipline of giving every feature flag an owner and expiry date and deleting it once its release is complete.
- Spring profile — A named set of configuration, such as local, test or production, that Spring activates to change properties and beans for one environment.
Taught in
- Blue-Green, Canary, Rings And Feature Flags — Microsoft Azure DevOps Engineer Expert (AZ-400) Exam Prep
- Case Study: Larkspur Freight — Microsoft Azure DevOps Engineer Expert (AZ-400) Exam Prep
- Two Clicks Nobody Wrote Down: Configuration And Infrastructure As Code — Certified GitOps Associate (CGOA) Exam Prep
- Thursday, With A Way Back: Promotion, Deploy And Release — Certified GitOps Associate (CGOA) Exam Prep
- Friday, Four Fifty: Progressive Delivery — Certified GitOps Associate (CGOA) Exam Prep
- Introduction to Release Strategies — Continuous Integration & Continuous Delivery Pipelines
- Feature Flags and DORA Metrics — Continuous Integration & Continuous Delivery Pipelines
- Restoration: Failed Deployment Recovery Time — DevOps & Site Reliability Engineering
- Trunk-Based Development Versus Git Flow — DevOps & Site Reliability Engineering
- Continuous Delivery Versus Continuous Deployment — DevOps & Site Reliability Engineering
- Decoupling Release From Deployment: Feature Flags — DevOps & Site Reliability Engineering
- Configuration And Profiles — Modern Java: Virtual Threads & High-Throughput Services
References
- OpenFeature: Introduction
- OpenFeature specification
- Pete Hodgson on martinfowler.com: Feature Toggles
- Spring Boot: Profiles