Source: kislayverma.medium.com

Why and how to use Feature Toggles
I mentioned feature toggles a couple of time in one of my recent articles on increasing deployment speed, and they have been a topic of discussion in my team at work, so today I want to dig into them in some detail to see what they are, how they can be used, and what may be the problems of using them. Feature Toggles (also sometimes called F eature Gates) are a kind of configuration used to switch specific features on and off at runtime.

This is a great start, but the problem is that in order to toggle the feature, we have to deploy a code change in these files, which might cause its own set of problems (maybe other changes have already been merged to the deployment branch).

The second best place to do this is to store all feature toggles in the application’s own database and to evaluate the toggle condition by reading from the database.

Since the idea of feature toggles is to, well, toggle between old and new code, you cannot just delete the old stuff and write new stuff, or modify the behaviour in-place.

Related Articles