Using a Toggle to Manage Feature Deployment

Toggle is a software or hardware switch that allows for a change between two opposing states. It is commonly used in options menus and other places where users can choose between alternatives like settings or preferences. When used well toggles can help update user preference quickly and clearly. When designing toggles remember to use clear and consistent visual signifiers, provide direct labeling, and evaluate societal and cultural context to ensure clarity and usability for your users.

When a feature is rolled out to production it is usually best to use a Toggle as the configuration mechanism. This provides the benefit of keeping the toggles side-by-side in source control and also allows teams to test against a specific toggle configuration before releasing it. Many teams also have policies to add a task to the backlog or a flag removal ticket whenever a Release Toggle is flipped off and can be used as a tool to keep the toggle inventory in check in the codebase.

Savvy teams will often move the toggle configuration out of static files and into some type of centralized store, typically a database that is already part of the application. This is done to reduce the friction of changing a toggle from a static file and can be accompanied by the build-out of an admin UI that provides product managers, testers, and engineers with a place to view and modify the feature flag configuration.

Using a Toggle to manage feature deployment also reduces the amount of time it takes for a team to change a toggle from one state to another, which can significantly impact the overall speed and velocity of the testing and validation process in an organization. Using a Toggle can also be a good way to prevent a team from accidentally breaking production code and to limit the number of times a release must be redeployed in order to fix a bug or to address a bug uncovered by regression tests.

Toggles are also a common tool for conducting multivariate or A/B testing. This is accomplished by creating a Toggle that will consistently send a user down one code path or the other based upon their cohort. A Toggle that is configured to expose a feature to Premium users is a perfect example of a Champagne Brunch Toggle.