Why and how to use Feature Toggles

Decouple deployment from release

Kislay Verma
7 min readDec 20, 2020
Photo by Florian Olivo on Unsplash

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.

What are feature toggles

Feature Toggles (also sometimes called Feature Gates) are a kind of configuration used to switch specific features on and off at runtime. By on and off I mean that they control whether or not certain code paths are executed (on) or not (off). They are used by developers when they want to change some existing functionality or introduce new functionality but they want to do it in a controlled manner, rather than having the changes go into effect as soon as the code is deployed.

Feature Toggles need not only be on and off, although that is how they are most widely used. Since they are a type of runtime configuration, they can be defined in any manner whatsoever. E.g. They can be used to enable certain new features only for employees (before public rollout) or only in certain geographical locations. In all cases, however, they are a means to switch behaviour i.e. whatever meets the toggle criteria gets the feature, others…

--

--

Kislay Verma
Kislay Verma

Written by Kislay Verma

Code, products, platforms, books, music

No responses yet