Software Release Glossary
Most commonly used terms and acronyms by product managers, engineers and devops, regarding deployment strategies

Feature Flags

What are feature flags

Feature flags, also known as feature toggles, are a powerful software development tool that turns certain functionalities on and off without the need to deploy new code.

Therefore, feature flags enable you to deploy changes on a continuous basis without any service disruptions. This is essential when you have several features that you want to test.

During deployment, you might find that some of the features are not working like they should so with feature flags you can instantly roll back the code through toggling leaving the live code intact without impacting other users or deployments.

Put simply, feature flags would enable your team to manage a feature throughout its entire lifecycle and allows them to place the user at the heart of the process by testing in production.

Martin Fowler breaks down feature flags or toggles into 4 main categories based on longevity and dynamism:

  • Release toggles: temporary flags which allow incomplete and untested code paths to be shipped to production as latent code, which may never be enabled.
  • Experiment toggles: highly dynamic toggle to be used for A/B or multivariate testing, which remain in place only long enough to generate statistically significant results.
  • Ops toggles: toggles introduced when rolling out a new feature with unclear performance implications to allow system operators to disable this feature quickly. They are usually short-lived but it is possible to have a small number of long-lived kill switches.
  • Permissioning toggles: toggles that are used to alter the features or product experience that certain users receive, such as premium or alpha or beta features. These toggles can be long-lived compared to the other toggles.

Feature flags use cases

Feature flags are incredibly versatile and can be used in a variety of contexts. They are not only used by engineering teams but also by QA as well as product and operations teams. In this section, we discuss some common use cases (for a more in-depth look into the many uses of feature flags, refer to this article on our blog):

Continuous delivery

Developers often need to collaborate when they are working on the same code base by relying on a branching model and so developers will, on a regular basis, pull code from a shared controller branch and do some work locally. Then, once their feature is ready, they would push the changes to the shared controller branch.

This is a concept referred to as feature branching that allows developers to collaborate within a central codebase while using branches to make any changes or develop new features.

This is the underlying concept behind continuous delivery which is the ability to release the current version of a software to end-users at any time. Its purpose is to improve the speed at which developers release new features to users.

However, there are times when a merge conflict occurs within the master branch, where each developer has made changes that conflict with changes another developer has made. Alternatively, let’s say a developer is finished working on Feature A but another developer working on Feature B is not yet done leading to the first developer’s stream of work becoming coupled with the second developer’s stream of work so these features cannot be released independently. 

Using flags helps teams integrate development branches back into the master in much shorter intervals. Consequently, with feature flags, it’s easier to turn off the features that others are working on. This would allow both the completed and half-finished works to be deployed but only the completed work would appear to end users while the unfinished feature is wrapped in a flag.

Therefore, by using feature flags, in-progress changes are pushed into a shared branch without blocking release from that branch so developers can release the completed feature A by flipping it on while feature B is flipped off. Essentially, you would be separating feature release management from code deployment. This results in continuous integration of developer work streams while keeping release of those work streams decoupled.

Testing at the flip of a switch

Feature flags allow all teams and not merely developers to continuously test in production to maximise outputs.

Consider this scenario: you want to test a new feature but only internally within your organisation. A feature flag can control this access so that your employee logged in through the corporate email address will see the new feature while users outside the organisation cannot. This way, you can ensure that this feature works as it should before releasing it to a wider audience. Thus, the use of feature flags will allow any bugs to be detected and fixed in the code without redeploying.

Therefore, the purpose here is to deliver new functionalities to a pre-selected group of users in an efficient and safe manner.

Flagship Sign Up

We can look at feature flags as a switch allowing you to continuously test in production at the simple flip of this switch. With continuous deployment, any new features can be introduced slowly over a period of time as opposed to one instantaneous (and risky) release so you can be confident that the final version of your release is bug free.

Any potentially risky change is put behind a feature flag and if anything goes awry, this feature flag can be disabled immediately without interfering with other deployments, all within seconds. In this case, just as you turn on a switch to test a new feature, you can implement an off or ‘kill switch’ through feature flags to turn off the troublesome feature or simply ‘kill’ it if this feature is deemed no longer necessary.

Choosing your user base

Feature flags enable you to test on whoever you want to by giving early access to your core group of users to ensure you are getting the most relevant and beneficial feedback to improve if necessary. The purpose here is to test and deliver new functionalities to a pre-selected group of users in an efficient and safe manner at a specified time.

You can also ask users to voluntarily opt-in to test your new features by sending your target user segment an invitation to test out the new feature. This way, you can rest assured that these users are more than willing to offer you the kind of feedback you are looking for. It is also a good way to demonstrate that your company is actively listening to its users and is proactively seeking to improve its services.

Gradual release

The benefits of feature flags are numerous. One of the main benefits is risk mitigation. There is always a risk with introducing any new features within a release. Feature flags, then, are essential for safe and reliable software delivery. Any new changes you introduce to your software can now be switched on or off as needed depending on feedback generated during testing.

As we have just pointed out, feature flags have the advantage of being able to test on a small subset of users, which allows you to get initial feedback, especially for a feature that might be risky so you can get initial reactions before this feature is rolled out to everyone else, typically done through canary deployment. This kind of testing would allow your team to catch any errors and roll back when necessary.

Essentially, with feature flags, you are giving targeted experiences to different users so for example, they would allow you to create more advanced features for your power users and something simpler for new, less advanced users. With feature flags, you can block users from certain countries or even users outside your organisation depending on the feature you are testing. This way, you can make sure that you are receiving high-quality, relevant feedback. 

Pay gates

Finally, feature flags allow you to set up ‘pay-gates’. This will be especially useful if you want to test and try out new features that are only available in your paid version so this way you can separately test your paid and free features on relevant users.

Similarly, feature flags help in managing entitlements. Let’s say that your company offers SaaS solutions with different membership plans, entitlements define the features that each plan can access, which result in heightened customer experiences and operational efficiency.

Concluding remarks

The bottom line is your team can produce much more efficient work by using feature flags to make changes so that you can be confident that you are releasing the latest and most polished version out to all your users.

If you want to see for yourself the difference that feature flags can make for your team today, why not sign up for a free trial with Flagship by AB Tasty, the feature flagging platform that can help you eliminate the risk of new feature releases!

Keep reading: The Definitive Guide to Feature Flags

More terms from the glossary
Smoke Testing

Smoke testing is a rapid regression test of major functionality to detect early errors and indicate whether the product is ready for further testing.

Read description
Version Control

Version control, or source control, is the practice of managing and tracking changes to software code.

Read description
Software Development Life Cycle

Software development life cycle (SDLC) refers to the different stages that a software goes through from planning to completion.

Read description
Copy link