Feature Flags - What and why
A feature flag (a.k.a. feature toggle) is a software development technique used to enable or disable certain functionality remotely without deploying code. Feature flags help decouple deployment from release letting one manage the full lifecycle of a feature.
Feature flag management allows for continuous integration/continuous delivery (CI/CD) to gradually roll out features to users. Continuous delivery enables shortening release cycles and getting new functionality in the user’s hands quickly and safely. Creating a CI/CD pipeline is necessary to increase the velocity of code deployments and thereby get software delivered to end-users faster. To move quickly, one needs safety measures in place - feature flags are one of those safety measures. With feature flags, one can turn off a feature that performs unexpectedly in production without rolling back the code.
Feature flags also eliminate the need to maintain multiple feature branches within the source code. All code changes can be made to the primary branch (trunk or master), and when the feature is ready it can be enabled via the flag. A single branch of code helps to eliminate merge conflicts, broken builds, thereby resulting in a cleaner codebase. Instead of using a feature branch, one can use a flag to gate features not ready for public viewing.
New features can be deployed without making them available to all users upfront. For example, a new feature can be made available to a small set of users for testing and feedback by using a feature flag to control this access.
领英推荐
Feature flags can also be used to manage beta programs, run A/B tests, and provision entitlements.
To sum up, feature management via flags is commonly used by enterprises looking at:
Associate General Manager at HCL Technologies
3 年Succinct! Only thing I would suggest is to cover 'hierarchy of feature flags' as well, without that eventually you may be staring at assorted feature flags - poor on maintainability and control. Thanks.
VP-Engineering | DU Head | AI/ML Practice Head | TOGAF 9 | SAFe 5 Architect | AWSCSAA | Enterprise Architect | Data Analyst
3 年Interesting
Passionate JS Full Stack Developer | Vue Js | React Js | Typescript| PWA | Express Js | GraphQL | Mobile hybrid Apps | REST API | Browser Extension
3 年Agree , Even I have observed that, now in modern world where feature are getting added more frequently in particular application. So from last 7-8 months I was working on Feature flags implementation only. This is mandatory to have in any type of enterprise application . This will get rid of so many things like Reverting code, again sanity check by QAs, again going thru Deployment until prod you just need to toggle the Feature Flag :)