A toggle is a switch that allows you to change between two different states or options. It’s used in technology, computing, and programming to provide a user with a simple way to activate a function and deactivate it. You can see this in action in everyday technologies like the Caps Lock and Num Lock keys on a keyboard or the options menus found in most applications.
Feature Toggles are a key tool for any product team that wants to build and deploy new features in a controlled environment. Toggles bucket your users into two distinct groups; when the toggle is switched ON they see the new functionality while when it’s switched OFF they see the existing version of the application. This allows you to test the impact of a feature with a select group of users before it’s rolled out to the entire user base and helps reduce the risk that a new release will flop.
Many people manage their toggle configuration using static files which can become cumbersome when deployed at scale. This also means that if you want to re-configure a specific instance of a toggle you need to manually modify the file or better yet re-deploy the artifact into your testing environments. This slows down the cycle time of your QA and can impact the important feedback loop that CI/CD provides.
To avoid these limitations it’s recommended that you move your toggle configuration into some type of centralized store (usually an existing app DB) and create a UI for administrators to view, manage and modify this. This will ensure consistency across your fleet of servers and allow for runtime re-configuration of specific service instances.