Feature Toggles
Feature Toggles
Feature toggles are basically ways to control the full lifecycle of your features. They allow you to manage components and compartmentalize risk. You can do pretty cool things like roll out features to certain users, exclude groups from seeing a feature, A/B test, and much more. Check out this video on canary launching to see the benefits of dark launching features. The foundational material can be found on Martin Fowler’s blog and more resources here.
- A Toggling Tale
- Categories of toggles
- Implementation Techniques
- Toggle Configuration
- Working with feature-toggled systems
- Google’s Scaled Trunk Based Development – DZone Performance
- Trunk Based Development Discussion
- Feature Branches with Bamboo
- GitHub
- Version control and branching
- BitBucket
- Version control and branching
- LaunchDarkly
- Feature flag management / production testing
- CircleCI
- Automated build and deploy to production
- LaunchDarkly Mobile iOS Feature Flag SDK – LaunchDarkly An installable feature flag software development kit for iOS apps. This SDK harnesses the LaunchDarkly app and allows you to target users and manage rollouts. Feature flags are evaluated in microseconds.
- GroundControl for iOS – Mattt Thompson “Many developers don’t realize that they are allowed to remotely control the behavior of their app (provided that the application isn’t downloading any new code). GroundControl gives you a dead-simple way to remotely configure your app, allowing you to add things like feature flags, impromptu A/B tests, or a simple “message of the day”..”
- Android Flagger – Massimiliano Marcon “Flaggr is a library that can be used in Android applications when there is the need for feature flags. Flaggr helps toggling feature flags at runtime. Once the library is complete it will also be possible to toggle flags directly from the backend, via GCM or by polling your flags API when the application starts.”
According do Edith Harbaugh of LaunchDarkly, Feature toggles are a software development best practice of gating functionality. Functionality can deployed “off”, then turned on via the feature flag, separate from deployment. More sophisticated conditions can be passed along with the feature flag, allowing rollouts to very targeted segments, such as “10% of users”, or “only people in China” or “no one at TechCrunch”, down to the specific user level. Feature toggles are important to separate code deployment from code rollout. Once feature toggles are in place, it’s possible to have fine grained control of your application. With feature toggles you can manage the entire lifecycle of a feature:
- Run beta programs on your live application by explicitly including the people you want to see a new feature @Canary launches – how and why to canary release
- Quickly turn off a poorly performing feature
- Allow users to opt-in for early access to new features
- Do phased rollouts to percentages of your users to verify there are no scalability issues Measuring the Performance of New App Features with LaunchDarkly
- Protect features from users by excluding them from ever seeing them – for example, excluding anyone from TechCrunch from seeing new functionality
- Run a/b tests of features to see which perform better Running an A/B test · LaunchDarkly
- Control subscription plans by bundling features flags into plans
- Show expert users and beginner users different features entirely
- Put portions (or your entire application) into maintenance mode @How LaunchDarkly uses feature-flags for rolling maintenance modes
- Cleanly sunset old, unused features
Resources for Feature Toggles
- Martin Fowler – Feature Toggles
- Wikipedia – Feature Toggle Overview
- Beautiful Builds – Feature Toggle Frameworks List
- Jim Bird – Feature Toggles Are One of the Worst Kinds of Technical Debt
- Feature Toggle Overview – Feature Toggles (Feature Switches or Feature Flags) vs Feature Branches
- Abhishek Tiwari – Decoupling Deployment and Release- Feature Toggles
- Slideshare Presentation on Feature Toggles
- O’Reilly – Chapter 9. Feature Toggle
- Fernando Rubbo – Feature Toggles: Good or Bad
- Tout – Feature Toggles at Tout