Uncategorised

How to Manage Feature Flags

A toggle is a control that allows a user to switch between different states or options. It is a common component in everyday technology and is often used in computing, programming, and communication devices. In general, toggles provide an easier and faster way to modify settings and preferences than radio buttons or multiple checkboxes.

Toggles are ideal for controlling system functionality and enabling or disabling features that don’t need to be active all the time. They take up less screen space than multiple radio buttons and are more intuitive to use, especially on mobile. Additionally, toggles tend to be more intuitive when used in conjunction with visual cues (such as movement or color changes) that communicate the state of the toggle.

Savvy teams treat their feature flag inventory as inventory that comes with a carrying cost and seek to keep the number of toggles they have under control. As such, teams frequently have a rule that they add a task to their backlog for removing toggles when they are no longer needed. Additionally, many teams also put “expiration dates” on their toggles that will cause a test to fail if the toggle is still around after its expiration date.

Ultimately, the most effective way to manage feature flags is through a system that supports dynamic re-configuration at runtime. This type of system is typically implemented through a dedicated UI that allows administrators and testers to view and modify the current configuration of all running toggles. This is the most flexible and manageable approach to managing feature flags, but it does come with the cost of additional complexity and development effort.

For a simpler solution, some teams opt to hardcode the toggle configuration into static files in their codebase. This approach can be reasonably simple and straightforward but it does require that every modification to the codebase include a change to the file that contains the toggle configuration. This can become relatively cumbersome at scale and can introduce a significant amount of churn into a team’s continuous integration testing process.

For a more sophisticated solution, some teams will use an existing application DB to store and manage their feature flag configuration. This approach can be fairly robust but it will typically require that developers or ops manually re-deploy an entire artifact in order to change the toggle configuration. This can significantly slow down the velocity of a team’s testing cycle and impact the all-important feedback loop that CI/CD provides. This is a trade-off that many teams are willing to make in exchange for the additional flexibility of a dynamic re-configuration system at runtime. In the end, it comes down to a matter of preference and the availability of an appropriate developer infrastructure for your specific situation. Fortunately, there are plenty of great options out there for managing feature flags at a range of levels of complexity and sophistication.