Feature Flags: Making Software Delivery Faster
Every company is a software company today, and software products are changing faster than ever before. As a result, companies are required to launch new features quickly and frequently to keep up with the fast-paced software world. This is why feature flags have become essential to any company’s software development cycle.
Feature flags are valuable for software developers as they allow organizations to gradually release new features and services by testing them with a limited group of people. This way, they can monitor how those users react to the new feature, discovering any bugs or issues early on so they can be fixed before a wide release. This also makes it easier to disable certain features whenever necessary.
This blog post will cover using feature flags as a launching point for new software features.
What Is a Feature Flag?
A feature flag is a simple mechanism that enables you to launch new features to a subset of users while keeping them hidden from everyone else. For example, when your app is live on the app store, you can use a feature flag to control which of your new features are visible to users. This allows you to roll out the new feature to only a selected percentage of your customers.
When your new feature is behind a feature flag, it is not visible to users. You simply have to flip the switch to make the new feature visible. This might sound like a small thing, but it can have a huge impact on your product’s success.
You can use feature flags to control how much risk your business is taking at any given time. You can also use feature flags to gauge the success of your new features and get some initial responses on how users react to the latest software features and releases.
They work more or less similarly to an electric company where the electricity can be made ON and OFF to a home or a selected locality from the main switch.
Why Do You Need Feature Flags?
When your business has new software features to launch, you have to be thoughtful about how you roll them out. Features that aren’t fully baked are not ready for a wide release. There’s the risk of negative reviews and decreased user adoption.
Feature flags have many other names like switch, toggle, or threshold, but they all refer to the same thing: A way to launch and enable features with limited scope and usage to a particular subset of people.
User feedback and continuous testing have become essential for any software company to succeed. In the age of continuous delivery, organizations need to launch new features faster than ever. Likewise, users expect new features to be added more often. The challenge is integrating user feedback into your development cycle so that you don’t just release another mediocre feature that nobody uses or cares about.
Feature flags enable you to get early user feedback to validate your features and make better business and engineering decisions.
When your business thinks of introducing new features, you must decide how to roll them out. With feature flags, the rollout can be effortless, just like the on and off buttons. This helps organizations, developers, site reliability engineers and release managers by reducing the pain of a software release. Otherwise, following a checklist while delivering new features to users is usually a big nuisance.
Feature flags are crucial to mitigate risk in software development. They enable you to ship code early and often and enable you to increase adoption of new features offering them to users more seamlessly.
When Should You Use a Feature Flag?
Feature flags are best used on new features that you want to test in a more controlled way. They allow developers to release new features without affecting the existing code. This is done by having two versions of the same code: one with the new feature and one without it. When the developer wants to release a new feature, they simply flip a switch and enable it for some percentage of users.
Here are a few examples of when you might want to use a feature flag:
- You want to control the rate of adoption of the feature.
- You want to control when the feature is visible to users.
- You want to control how much risk you are taking with the new feature.
Harness Feature Flags
Feature flags at Harness initially started as an internal project. We’ve learned a lot from this project and applied what we learned to the customer-facing feature flags product.
Harness has two types of feature flag types: Boolean and multivariate. Boolean has only two variations: true and false. Multivariate as multiple variations; you can add as many custom variations as you like.
Boolean flags are simple and used for A/B testing. Multivariate flags are suitable for experiments, while your product team wants to know the initial response of the new features and can have multiple targeting rules on how you would like to present/show them to your users.
With Harness feature flags, you can now work with them in an Infrastructure as Code (IaC) fashion — flags as code. With this ability, the developers will be able to work in their own workflow (in code). Organizations can standardize the process and steps required to release a feature with Feature Flags Pipelines. With Harness feature flags pipelines, you can have a better software rollout strategy as shown in an example below.
Feature flags are a powerful way to manage risk in software development.
If you aren’t sure of a certain feature, you can experiment with feature flags to find out what users think of it before releasing it to a wider audience.
We highly recommend using feature flags and including them in your release pipelines. For any company that is willing to streamline its software deployments and ship more often, feature flags work significantly well.