Feature toggle is a capability to enable/disable a codepath at runtime without deploying new code and control what business features are turned on/off.
Toggles should have short lifespan
Name toggles well
NEVER reuse the toggle for different features (except epic toggles)
Always toggle OFF unsafe codes
Monitor toggles (Don’t forget to clean up the toggles, remove dead code)
Apply branch by abstraction whenever it possible
Branch by Abstraction is a development technique that implies that you do a task gradually and release the application at the same time
Branch by Abstraction relies on a set of rules. There are 5 steps (some glue them up to 4)
Toggle Types
Compile and Startup toggles not supports runtime updates, requires application redeployment/restart. Periodic and Activity toggles support runtime updates, not requires application redeployment or restart.
A/B Testing
An A/B test is a split testing methodology that hosts two versions of a feature. The traffic is segmented into two groups, each shown to a version of the feature. Here a feature toggle can be used such that if the toggle is turned “on” the user segment will view the A version of the feature and if it’s turned “off” the user segment can experience the B version. A/B testing is a popular testing technique in software development that allows to test variations of codes and get a common consensus on how they are received by the users.
Canary Deployment
Canary Deployment deployment is also a testing method that is a risk-averse way of testing where only the new feature version is released to only a small subset of users. Feature toggles can be used for this deployment method as well. Since the process of canary testing is meant to test bugs in the code, if during testing the dev team encounters any errors they can simply roll back the feature by turning the toggle off. Dev teams can also make use of feature toggles to acquire data and work deriving insights from them.
Trunk Based Deployment
Trunk Based Deployment is a software development strategy where new code or features is added to the main codebase or ‘trunk’ instead of creating multiple feature branches. Feature toggles can be incorporated in deploying this strategy, as it enables rapid deployment and roll back just by using a toggle switch.
Feature Toggle as a ‘Circuit Breaker’
The ON/OFF switch mechanism of a feature toggle can work as a circuit breaker mainly for the purpose of maintainability and recovering from failures. If a feature exhibits major glitches it can simply be turned off breaking its running circuit.
Adoption expectations
System Components | MVP | MVP+ |
---|---|---|
Branch by abstraction |
+ |
+ |
Compile-type toggles |
+ |
+ |
Startup-type toggles |
+ |
+ |
Periodic-type toggles |
+ |
+ |
Activity-type toggles |
|
+ |
Centralized feature toggle solution |
|
+
|
Tools
Functionality | Tool Name |
---|---|
Documentation Collaboration |
Atlassian Confluence |
Architecture design tools |
Microsoft Visio, Draw.io, Miro, Lucidchart, Archi |
3rd party SAAS feature toggle solutions |
LaunchDarkly, Azure App configuration, Optimizely, ConfigCat, Flagship, Split
|
Roles
Name | Responsibilities |
---|---|
Scrum Master/Team Coach |
Coach and support usage feature toggle techniques for complex time consuming activities |
Solution Architect |
Design solution to support feature toggle |
System Architect |
Design systems to support feature toggle |
Product Owner |
Prioritize features and refine toggle states |
Developer |
Adopt feature toggle techniques and process to embrace small incremental changes |
Build Engineer |
Integrate automated release and deployment process |