Back to all posts Back

The Product Leader’s Guide to Continuous Deployment With Feature Flags

Taplytics Feature Flags

There’s a lot of risk involved in releasing a new product. Not only do you need to release on time, but you also have to ensure that the experience is as seamless as possible for your customers and your team. Lagging behind schedule due to poor release management or causing unnecessary downtime due to bandwidth or system constraints can have a direct and lasting impact on your relationships.

That’s why it’s so important to maintain as much control over the release process as possible—which is where feature flags come in. This tool allows you to roll out or roll back features easily, so you’re able to minimize any negative impact on your customers and team.

They’re also at the core of continuous deployment. Without feature flagging, it’s challenging to achieve the right balance between speed and quality inherent to the continuous release process.

When you understand what feature flags are, how to implement them, and why they’re so powerful, it’s easy to create a better release experience.

What are Feature Flags?

Feature flags (also known as feature toggles) are a software development technique that allows you to turn specific functionality on and off without writing additional code. They provide you with the ability to make dynamic changes to your code without the need to deploy a new version.

These dynamic changes give you more control over how and when you release your new product or feature. Using feature flags means it’s easy to:

  • test features in production,
  • collect actionable user feedback,
  • control the individual user’s experiences, and
  • get more visibility into the impact of your release.

Used correctly, feature flags are one of the most high-leverage tools you have at your disposal for any upcoming release.

How Do Feature Flags Work?

Feature flags enable, disable, or hide specific features for testing or release. They give you a way to manage your application’s behavior for testing or release with select user groups. Whether you’re making changes to your codebase, your website, or the functionality of an individual process, feature flags can help.

Let’s say you’re planning a redesign of your product and want to roll it out to customers slowly so as not to impact their overall experience with your service. Feature flags give you the ability to control which users are first to see the redesign, when they’ll be able to see it, and how long it will take for all users to have access to the feature.

In the event of issues, such as your application crashing due to increased user interaction, you can roll the feature back to its previous state immediately. Think of it like flipping a switch.

There are two main functions of feature flagging for development and product teams. While marketing teams can make use of this functionality to A/B test site design and messaging, feature flags provide more direct value to developers and product managers.

Feature Flags for Development Teams

Feature flagging is the key to continuous development. They are the software development technique that gives engineers the ability to create branching production trees—the underlying functionality that helps you develop on an individual feature, or aspect of a feature, without impacting the code that’s live for customers. Feature flags can also be used to run tests with specific segments of your user base while in production.

This image outlines the branching process, where developers work on an upcoming feature alongside the master branch, or production branch. Whenever you create a new feature, this practice ensures you’re not making changes to the customer-facing product without full confidence in its security and usability. Basically, you break off from the main trunk of your production pipeline to create the feature and merge it back once it’s complete.

Git merge
Git merge tutorial via Atlassian.

Starting at the “common base” in the example above, developers can use a feature flag to split off an additional branch. This allows them to actively develop the new feature without making changes to the codebase their users interact with. The process of creating this flag is outlined in this post on Martin Fowler’s blog.

Once the developers are done working on the feature, they’ll merge it back into the master branch, essentially turning off the feature flag they created in the first place. This brings the code they created on the feature branch back into production.

The more developers you have working on a specific feature, the more complex feature flagging becomes.

Feature Flags
Feature and release branching via Stack Overflow.

It’s important to understand that while feature flagging helps create a more seamless experience for developers, it does add complexity to your system. Each new branch exists independently from the other until it’s merged back into the master, so always make sure you’re branching as efficiently as possible.

The process of merging your feature back into the master branch isn’t as straightforward as just flipping a switch. The code created during development needs to complement what already exists, which is where product teams come in.

Feature Flags for Product Teams

When product teams use feature flags for a product release, it helps you make small and impactful changes quickly. This decreases the overall time it takes to release a new product or feature and helps you provide more value to users on an ongoing basis. Combine this with the fact that you can easily test new features while in production, and it’s easy to see how powerful feature flags can be.

Consider the way you normally release a new product or feature. Your planning and development process makes it easy to execute on a release management plan, but any change to the overall experience of using your product can have a lasting impact on your relationship with customers. Once you’re done planning and active development, the risk becomes all about how your upcoming change impacts the user experience.

Feature flags help you mitigate the risk of a botched release through a Canary release, where you roll out a new feature to a small subsection of users first—before making it available to everyone. This phased release schedule minimizes the impact on customers by giving your team more control of the experience at every step of the process.

How to Run a Phased Release With Feature Flags

To get started, have developers create the feature flags in your codebase first. Once they’re created, your product teams can use them to target specific segments of your user base and roll out features with absolute control.

Phased Release

  1. Determine the segment of your user base for initial release. Whenever you release a new product or feature, there’s a part of your user base you know will benefit from it the most. Determine this group by analyzing relevant user insights and using that information to identify users who would benefit from feature flags.
  2. Build feature flags targeting those users. Once you understand what your users need, the problems they face, and how they interact with your tool, it’s time to build a new feature that offers a solution. This is the active development process where you use feature flags to create a branch in your code.
  3. Create a schedule for how the release will progress while you’re in active development. This schedule should define the time it takes to finish development and test the new feature as well as your intended release date.
  4. Define a rollout/rollback contingency plan. There’s always the potential to run into issues during a release, so you need to have a strategy for how you’ll react in that situation. Ensure a seamless experience for both your customers and your team with a contingency plan.
  5. Perform the release. Roll out your new feature using feature flags from Taplytics. Monitor the progress of your release in case any issues arise and you need to follow your contingency plan.

Track the impact on your customers and team. Continuous deployments are built on the idea that more data leads to better overall product decisions. So once you’ve successfully completed your phased release, do a post-mortem to understand any areas of opportunity to improve feature flags in the future.

Release With Confidence Using Feature Flags

Any new release comes with inherent risks, so it’s important to find strategies that make you feel more confident throughout the process. Feature flags are one of the most powerful ways to manage your release more effectively. When every touch point during the release process can have a lasting impact on your customers, you need to have a process in place that minimizes risk.

With Taplytics, you have the ability to target specific segments of your user base, roll out and roll back features with the click of a button, and follow a timed release schedule. This makes it easy to release with confidence, ensuring an effortless and efficient release for both your customers and your team.