Leider ist der Inhalt dieser Seite zur Zeit in der ausgewählten Sprache nicht verfügbar.

Machen Sie sich mit Goals by KeepSolid 3.0 vertraut!
Holen Sie sich jetzt die aktualisierte Version zum halben Preis
Lernen Sie auch die neue Google-Kalender-Integration kennen

Feature Flag

What is Feature Flag?

A feature flag, also known as a feature toggle, is a software development technique used to enable or disable select functionality during runtime without deploying new code. In this manner, teams can deploy new features without making them visible to users so that they experiment freer over the full feature lifecycle. Besides, flags can be assigned to a specific group of users to allow for more targeted behavior.

Learn the definition of Feature Flag

How it works

During development, if software developers want to disable a particular feature on production, they wrap the relevant code paths in a feature flag. Any feature flag is, in its essence, a binary “if statement” that checks if certain behavior is activated. For example, the code block checks if the feature is enabled:

if(featureFlags[‘my-feature’] == true){

renderMyFeature();

 }

When ready to be shipped to production, the new code is deployed as usual, but will remain inactive until the feature flag is explicitly activated.

Feature flag benefits

With feature flags, code can be deployed to production in a dormant state to be activated when the team finds it safe and feasible. This makes deliveries more stable and error-free in several ways:

  • Minimizing risk – teams can build feature flags into a CI/CD pipeline or combine them with any system monitoring, logging, and metrics responding to intermittent issues. If any issue occurs, the team may remotely disable the poorly performing feature with the flag.
  • Validating functionality by performing “soft rollouts” of new features. Teams first deploy new features disabled and activate them at a particular moment allowing the team to perform QA and verify that it behaves as expected without exposing it too much to users.
  • Assisting in trunk-based development – feature flags can isolate new changes while keeping stable code in place. This allows developers to commit to the main branch (trunk or master) of a repository behind the feature toggle instead of creating long-running feature branches. Keeping a single branch minimizes complicated code integration and deployment, helps to eliminate merge conflicts, and reduces broken builds.

When to use feature flags

Feature flags can be used in many scenarios and boost the team’s creativity. Yet, the most typical use cases are, as follows:

Experiments

The primary use case of feature flags is conducting experiments or A/B testing. It is possible to utilize multiple flags simultaneously to activate different features for different subsets of users and measure them against one another.

Continuous deployment

Continuous deployment is a pipeline that automatically deploys new code to production. It relies on multilayered automated tests that verify this code as it moves through the pipeline. Feature flags can be an integral component of a continuous deployment system and make continuous deployment even safer by separating code changes so that the features are not visible to users.

Migrations

When an application requires a data migration with changes in dependent application code, it might imply a sensitive and multitask deployment coordinating between the database and the application changes, which is prone to failures and errors. Feature flags reduce the complexity of such deployments allowing developers to make changes to the database and immediately enabling them to match the application code reducing the chance of desynchronization. 

Canary launches

Canary launches in software development mean that a new feature or code change is first deployed to a small subset of users and if there is any sign of a failure, it is immediately rolled back. This is essentially done with feature flags that restrict the audience and toggle off features, if necessary. Feature flags are essential to this process since they restrict the audience pool and can toggle off features easily.

Collecting feedback

Another benefit of releasing a new feature to a restricted audience is the opportunity to collect feedback and decide on the feature release depending on its acceptance by the users.

System outage

A feature flag can also be a system outage tool that switches off the whole website for downtime or maintenance. This can be extremely useful in the case of sensitive deployments or an urgent resolution of an issue.

 

The ability to disable and enable features, to reveal different variations of them and the whole system to users gives an unprecedented freedom to explore user needs and discover what users want on the fly.

 

Stay on top of Business Goals

Set Goals, Plan Strategy, Involve Your Team, and Achieve Big Results. Manage the future with our Leading Goal Management Software

Alle Rechte vorbehalten