blog post banner image

How Can Feature Flags Help My Business

Ann McArthur


Understanding Feature Toggles: Pros, Cons & Examples

Feature flags give a software team the power to reduce risk, iterate quicker, and gain more control. Feature flags allow you to decouple feature rollout from code deployment. This separation allows you to get fast iterations, so you can react to feedback quickly and get customer validation for your ideas quickly.

User-friendly release control can unleash the true power of your software. In order to provide a better experience for customers, feature flagging, also known as feature toggle tools like DevCycle allow staff from different departments to contribute to a release so engineers can focus on coding.

There are several benefits and use cases for feature flags from launching a new feature release to testing with beta users, using CI/CD in your development process, or running experiments.

What Are Feature Flags?

Feature flags are essentially an on and off switch to enable or disable code wrapped in a feature flag. This allows users to easily make features available for certain users or hide the code while it still lives in the main branch.

Who Uses Them?

Anyone on your team can use feature flags as a best practice, but they’re most useful for engineers, product, and marketing teams. Engineering teams are the main users since they’re the ones using them on a daily basis. Developers can use feature flags for a CI/CD software development process, allowing them to continually merge code into their main trunk. This minimizes the dreaded merge conflict and allows them to be tested in a production environment. This allows them to detect edge cases and no test environment beats testing in production.

Product managers can use feature flags to manage product launches. With a feature flag you can easily turn code on or off meaning product managers can use this tool to determine when code will be available for users. They can also specify which users will receive the code or just make it available for select internal users as part of the testing process prior to launch. Once the code is live, product managers can monitor the code to see how it performs. They can begin by launching the code to a small subset of users. If it performs well they can gradually roll it out to more users or use a feature flag as a kill switch to disable it. This ensures that users won’t see a product with bugs.

Marketing teams can use feature flags to create personalized messaging and unique user experiences. With a feature flag, you can have a feature only be available to certain individual users based on predetermined criteria. Marketers can use feature flags to give users deals or offers that are personalized to them. For example, they can show only people in Canada a certain message on their app surrounding Canadian Thanksgiving and another message later in the year for just Americans focused on American Thanksgiving. They can use any other user attribute such as user engagement or past behavior to personalize the user's experience.  

Product and marketing teams can also leverage feature flags to A/B test different features or user experiences to see which one performs better. This ensures that they’re improving their user experience since their real users are the ones showing what version they prefer more.

Different Types

There are several different types of feature flags. Some examples are release, experiment, permission, ops, client-side, and grouping flags. Release feature flags allow you to release features independently of each other, with true continuous delivery. Experiment flags can be used to monitor the impacts of different code paths or provide different functionality of a single feature as a multivariate test. Permission features are features that are gated based on specific users' properties.

When releasing a feature with unknown performance implications, an ops feature flag can keep your site running smoothly during the deployment. Client flags are an invaluable tool for brands. They can be deployed to any app or website, on any device through a client-side SDK. Finally, with group feature flags you can group a set of feature flags together to define which flags constitute a fully functioning feature. Toggle all flags within a group on or off to manage a complete feature from one place.

What Are The Benefits?

Feature flagging is a new way for programmers to release features. One of the pros is that with this strategy, they can wrap a new feature in an if/then statement to gain more control over its release. This way, programmers can get the most out of their "new" features by testing them on a small group of customers before releasing the update to everyone. Feature flagging is an integral part of continuous delivery. It allows software teams to release new features quickly and with high reliability.

Validate Feature Functionality

Feature flags are an easy way to validate that a feature works as expected. A phased rollout is a great way to verify scalability on your website and to ensure that new code works. This can be done by selecting percentages of users to receive the new code. You can also employ a random selection to test the infrastructure for vulnerabilities on your site.

There is no need to hope that the new business functionality will work well. Feature flags can be used to test and verify if it can handle load in the real world. By incorporating this testing before the new functionality is released, you can ship with confidence.

Minimize Risk

Feature flags help you minimize the risk of a new product launch. Through testing in production and leveraging gradual rollouts you can ensure your feature is safe. You can quickly turn off a poorly performing feature. If you combine this with percentage rollouts, you can rollout to only 1% of your users. This is even more powerful. If something goes wrong, you’ve only disrupted the smallest possible audience.

Are There Any Downsides?

The only con of using feature flags is that it can take a long time to implement, however using a tool like DevCycle significantly reduces the time to get up and running. In addition, the time it takes to implement feature flags into your software development process is very quickly made up due to the efficiencies that they allow for your development team.

Use Cases

There are several use cases for feature flags. From testing code in production, running experiments, and migration systems. They can also be used for canary releases, continuous deployment, and handling system outages.

Product Testing

Prior to launching a new product you want to test it to ensure it’s ready to be shown to your users. With feature flags, you can test code in production which allows you to detect edge cases that you may not see in a test environment. In addition, feature flags can be used to only have features available for certain users. This can be done to have it visible to team members for testing or to make a feature available for beta testers.

Conducting Experiments

Feature flags let you see which features your customers want. It’s like A/B testing, but for features that are live. This way, if you switch, you can get measurable KPIs to see if the change has made a difference. You can also launch 2 flags that are slightly different to A/B test how they perform. From there you can keep the winning flag alive and kill the other one.

Migrations and Modifying System Behaviour

Changing databases should be a simple process, and it should be done with caution. Feature flags should be an integral part of any software release to do things like database migrations. When you're testing a system, it's important to have live data. You can wrap your data access in the feature flag which means that you can plan a migration. You can leave one flag turned off for most users then slowly move users over to a new database. If it looks good, turn on the flag with the new database for more users.

It's significantly easier to roll back if something goes wrong, and you can track the test results with real people. You can also use feature flags for schema changes to an existing database.

Canary Launches

If you want to test how your new feature will perform or impact your users and system you can gradually roll it out through a canary launch. This means that you’ll make the feature available to a small percentage of your users. As your new feature performs as expected and without negative feedback from users you can gradually roll it out until 100% of your users gain access to the new feature.

System Outage

If it’s a high traffic time of the year, you can use feature flags to prevent system outages. Let’s say it’s Black Friday and you know there will be a spike in traffic. Rather than risking your site from crashing, you can use feature flags to turn off non-essential parts of your website to make the users’ experience faster and lighten the load on your system.

Continuous Deployment

The continuous deployment strategy is a DevOps concept that teams integrate feature release planning into the development process. This can be done by integrating flag-based releases into the development lifecycle. This integrated approach offers benefits such as control over features and continuous integration. This allows developers to continually add new code to their main branch while minimizing merge conflicts.

How To Implement

Feature flag-driven development is a team-focused engineering practice that emphasizes team collaboration, feedback, and full release lifecycle management. The purpose of this practice is to encourage teamwork by creating iterations where each developer is able to work on different features.

As an engineering or product manager, your mission is to deliver quality software on time. You are looking to make your team fast, productive, and more coordinated. Most importantly, you want your customers to love your product. Feature flagging tools like DevCycle can help you achieve all these goals: on-time delivery, with less risk, for a product your customers love.

Try DevCycle Today!

DevCycle is a tool that allows you to reap all the benefits of feature flags without the tedious process of building them in-house.

Get started with a 14-day free trial to see how feature flags can accelerate your launches.

Written By

Ann McArthur