Skip to main content

What are Feature Flags?

· 5 min read

A guide on feature flags key concepts and how to use them.

So, what is a feature flag?

A feature flag is a software development practice used to launch new features, without deploying new code. It decouples deployment lifecycle from product launches and allows software to be tested in production without impacting customers.

"A feature flag is a control switch to turn on/off software experiences.

How does it work?

A development team deploys a new code path gated by a feature flag, which can be a simple if-else statement. For a specific flag value or state, only the matching code path is executed. The flag state is controlled remotely, via a graphical interface, without the need to perform additional code changes or deployments. After the original deployment the team can iterate on the new feature, perform QA testing and do live meetings with stakeholders on the new code path, without end users seeing it. Once the team reaches a decision to launch the new product or feature, this can be performed instantly by setting a new flag status on the flag control interface.


Putting pieces together: A dev team wants to launch the next big thing.

WhatFeatureFlagIs.png
  1. Create a feature flag on the web console;
  2. Define "Off" as the current state and "A" as the launch state.
  3. Integrate with the Remote Flags APIs and add a new code branch;
  4. The code is deployed in a secure and timely manner, respecting the set "Off" state;
  5. QA testing is done, and the next big thing is approved for launch.
  6. On the launch date, set flag status to "A";
  7. Customers see the next big thing immediately!

Note: from steps 1 to 5 Customers are seeing the current UX, corresponding to option "Off".

In Remote Flags you can replicate this example using a toggle feature flag.


What pain points are feature flags addressing?

Software deployment might seem a straightforward operation but...

  • Is usually performed by tech people, such as developers or release managers
  • If a business person considers that "now" is the correct moment to launch a new promotion or introduce a behavior change, they depend on a development team for that launch.
  • If teams are off-work, the deploy might need to wait several hours or even days, resulting in missed opportunities or revenue losses.
  • Deploy time depends on software complexity and might take several hours or even fail with a need to restart
  • If a new version launch introduces a bug, an old version needs to be re-deployed, taking hours or days.
  • The impact might be severe, such as having systems offline, exposing customer data or affecting customers experience for a long time.

A feature flag offers instant control to timely and confidently launch software without the before mentioned pain points. The process can also allow controlled launches with gradual dial-ups of features or targets, and immediate rollbacks if an issue occurs, minimizing launch risks and business impact.


Different feature flag types and applications

Features flags are used in software development lifecycle and require configuration from development teams. However, they are not an exclusive tool of DevOps teams, they can also be leveraged in other scenarios by Business teams like product managers, sales or marketing teams.

Technical Feature Flag
  • Focus on controlling new version deploys (and rollback) to avoid or reduce impact of eventual bugs on business performance.
  • Used to measure performance impact of new features.
  • Managed by developers and delivery managers.
Business Feature Flag
  • Focus on controlling software behavior, timely launches, geographic or user type options of software experience.
  • Managed by business personas, product managers, etc.
  • Easy and simple to use UX, enabling precise control on how the software follows market behavior.

Why should I use Remote Flags and not build an in-house solution?

As in all companies, resources are limited, and today, in a competitive market where developers are scarce, investment in the company’s core business typically provides a better return.

A company focused on e-commerce will better benefit from using its manpower to create new product capabilities that increase sales, such as: new promo-code input, rather than focusing on building a side tool to support one of the internal processes; improve the checkout service instead of creating an interface to change flags; create a new size & fit tool instead of creating a system that helps on controlled deploys.

To complement, while building an in-house one-off solution for feature flags might seem like a long-term investment, its features will quickly become limited to what the business needs to evolve, while also requiring support for its use, proving to be just another product, outside the core business that requires internal investment.

By using Remote Flags, you will see a product that is constantly evolving, providing new features that all your users can take advantage of, while focusing your resources on what truly matters.