Skip main navigation

Feature Flags

One of the interesting things is separating deployment from release. And a lot of organisations use feature flags to determine whether or not something is visible to a user of their application. What they allow us to do is to take something, push it out to the production environment– in other words, deploy it– but not actually release it to the customer. Let’s take a look with a definition of that. Feature flags are toggles that show or hide features in the UI through some sort of configuration. It’s used if features aren’t done but you want to push them out to production, or if people shouldn’t have access to those features yet. They may be done, but we’re not ready to launch them.
Also, very helpful for things like A/B testing, or setting up permissions for various user groups, or operational tasks, a whole bunch of other things. In fact, I’ve often seen people use feature flags to identify groups of users who have paid extra for extra features. You can go in and say, I want to pay $5 a month. You get access to this bucket of features. I want to pay $10 a month and get access to a larger bucket of features. So feature flags are also useful for that. Now, there’s a lot of tools that are available for setting feature flags.
On the .NET framework, there’s things like Launch Darkly, and there’s tools for every framework out there to let you push, into production, features that aren’t yet turned on for your users. So look into feature flags as something that is potential option for you to use in your DevOps pipeline that might allow you to hit a faster cadence and get code out to production, even if it’s tagging along some code that’s not yet ready for users to see.

In this first step of exposure strategies, we will investigate feature flags. A feature flag is a conditional in your code, an if, then for two different options. At its simplest, a feature flag can be used to flag new or risky behaviour. First, the feature is deployed off. Then, separate from deployment, you can turn on the new feature.

If the feature doesn’t behave as expected, it is possible to shut it off quickly. This is better than rolling back an entire version because you have isolated the change. In addition, it allows development on other features to continue without forcing a complete rollback. In effect, you’re isolating the change while your codebase evolves around it. Risk is the uncertainty of unknown issues. With feature flagging, you’re mitigating risk by making every feature encapsulated and controlled.

Feature flags are effective for risk mitigation, fast feedback, hypothesis-driven development, and long-term control. There’s no one right way to use feature flags.

In the following step, we will learn about experimentation.

This article is from the free online

Microsoft Future Ready: Fundamentals of DevOps and Azure Pipeline

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education