Feature Flags for Better Control and More Experimentation

What does Feature Flag mean?

Feature flags are a fantastic Agile tool that lets you control deployment with greater speed and fewer risks. Unlike long-running feature branches that frequently create complex code merges when features are ready to be integrated into the main branch, feature flags allow us to quickly and easily deploy small pieces to a limited group who can check them before they’re deployed to the whole user base.

A simple yet powerful tool, feature flags are truly a revolutionary part of the build process.

Feature Flags vs. Other Processes

How do feature flags differ from other software delivery processes like pull requests and long-running branches?

  • Often used as a default process, the biggest drawback to branches is how long they tend to live. Multiple short-living branches, as good intentioned as they may be, often impede delivery performance.
  • Likewise, when pull requests go unhandled for too long, aka a few days, they can quickly “gather dust.”

Unlike feature flags, both of these processes prevent teams from:

  • Delivering quickly, often, and in small batches.
  • Removing bottlenecks, blockages, and all the other stuff that causes delays.
  • Getting timely feedback.

Feature flags, on the other hand, let us deploy smaller features that turn on and off for specific groups. We’re able to get the smallest amount of code into the trunk as quickly as possible, which allows for better testing and less breakage.

How Feature Flags Work

Sometimes called feature toggles or feature switches, feature flags turn certain functionalities on and off during runtime, and they do it without deploying new code. This brings a lot of value to the process by allowing us to:

  • Make changes in a low-risk scenario.
  • Shift tiny pieces of code while stable code remains in place.
  • Test small things like buttons that don’t work with live data.
  • Have more controlled experimentation over a feature's lifecycle.
  • Choose when and to which users new code is delivered.

To validate feature functionality, teams can also use feature flags to perform soft launches or rollouts of new product features.

How Feature Flags can be used in an Agile environment?

Here are a few practical examples of how feature flags can be used in an Agile environment.

  • Product testing. Smaller footprints are always more testable. Feature flags are used to progressively release new product features to determine if they’re worth the investment return. A partial idea or new product feature can be deployed to a small group of users to gather feedback. If it’s enthusiastically endorsed, it can be rolled out to a larger user base. If it’s a flop? The feature flag can be disabled and removed later from the code base.
  • Migrations. Feature flags allow teams to safely migrate or update databases. While no database migration is easy, feature flags make it easier to test it with real, live data and much easier to roll it back if something goes wrong.
  • Experiment feature flags allow you to perform A/B tests against a deployed feature. If the feature being tested is a winner, you can change that feature to a feature rollout. If the results are less than anticipated, the flag can be removed.
  • Canary launches allow you to gradually release new features while simultaneously testing other features without making major deployments. With a canary launch, you can assess things like whether users are happier and if a new feature increases system load.At Zibtek, we like using feature flags as often as possible. They allow for continuous deployment and add safety to the process by putting a “kill” switch on each new feature. To learn more about where feature flags fit into Zibtek’s sprint planning process, contact us online today to schedule a consultation.