DEV Community

Parker Software
Parker Software

Posted on

Feature flags: what are they good for?

Alt Text

Feature flags, otherwise known as a ‘feature toggle’ or ‘feature switch’, are a nifty tool that help with feature management. A feature flag grants developers the ability to turn features in their software off or on at will. (That is, without releasing new code.)

With feature flags, you can enable or disable your product’s features any time. Even after you’ve deployed your code.

But why is this so useful? Here, we explore the different uses of feature flags, and why they’re so beneficial in product management.


Good for release management

One use of feature flags is for release management. Such feature flags are sometimes known as release flags or release toggles.

A key benefit of these helpful flags is that they help you keep deployment separate from your rollout. You can add the feature-enabling code to your server, without making it available to users.

So, you can deploy a half-built feature as latent code. Then you can continue to work on it, and turn it on when it’s ready for people to use. Or, you can leave it switched off if you choose to drop that feature.

Plus, feature flags help you reveal new features over time. That is, you can gradually turn on functionality as it becomes available.


Good for allowing permissions

Feature flags are also useful in a permissions context. These feature flags allow you to manage which features are available to any given user.

Permission flags, then, prove instrumental when it comes to managing different delivery models. You can turn features (or even sets of features) off and on based on the usage allowances of any given user. For example, toggling the use of premium features for customers that pay for them. Or revoking access to a feature after the user has hit a cap. Either way, feature flags are great for tightening control.

They’re also handy if you want to restrict the availability of features to your internal teams only. This might be for testing, or it could be to help you manage the program. With permission flags, you can turn these features on for internal use and off for your customers.


Good for operations

Feature flags are equally useful for your operations team. They are a powerful tool for controlling the operational aspects of your system.

For instance, your team can mitigate the risk of outdated or experimental features. If a new feature is posing an unforeseen consequence, operational teams can turn it off. Or, if a feature becomes outdated, feature flags can help you retire it.

In addition, you can minimise change aversion by removing features gradually. (Achieved by toggling small sections of functionality.) Or, if preferred, you can hit the kill switch and remove access to entire features in one go.

Another use of operational feature flags is manual traffic management. So, a customer’s usage spikes or your traffic rises to a point that puts a strain on your systems. You could use operational flags to throttle usage and turn off draining features, to prevent a service outage.


Good for experimenting

Next, feature flags are ideal for experimentation and testing. You can release features to different customers. Then, you can collect data about how they use the new features, which ones are popular and so on.

So, feature flags also offer the benefit of easy A/B testing. With them, you can toggle the features for different groups of users in an experiment. Then, you can collect feedback about the preferred design, function or quality of your software. 

With feature flags, you can also allow your users to preview upcoming features. You can then collect feedback to fine-tune new functionality before mass rollout.


That’s what feature flags are good for

Feature flags are an underrated tool. They’re useful in various ways, from managing permissions to facilitating experimentation.

So, are you using feature flags in your code?


Originlly published here: https://www.parkersoftware.com/blog/feature-flags-what-are-they-good-for/

Latest comments (0)