Skip to content

What Are Feature Flags?

Developers embed feature parameters in the product when releasing the version and adjust the parameter values remotely, so that users can receive the feature changes locally. This is convenient for quickly verifying the optimal parameters.

What Problems Can Feature Flags Help You Solve?

  • The existing configuration code can be used to distribute the experiment at any time without changing the code, improving the agility of the experiment.
  • After the experiment is over, the configuration information of the winning variant can be solidified to the feature flags platform, and the experimental results can be released with one click.
  • Support multi-module and multi-version control under the product, support multiple strategies, easy expansion of strategy capabilities, and precise control.

How to Use Feature Flags?

The following content can help you understand how to use feature flags.

Step 1 - Create Feature Flags

image.png

You can enter the page from the left navigation "Feature Flags," click the "Create" button in the upper right corner, and then you will see the following page:

image (1).png

Fill in Basic Information

  • Name Fill in the name of the feature flag. Names can only contain letters, numbers, and underscores.
  • Description Fill in the introduction of the feature flag to help you and your colleagues understand what the feature flag represents.
  • Owner The owner can modify and delete the feature flag. You can add other people to manage the feature flag with you.

image (2).png

  • Add Rules Rules can help your feature flag distribute different values to different groups of people. Before adding rules, you can choose the format type of the rules' value. We provide the following types for you to choose from:

image (3).png

Click the "Add Rules" button to add a rule, the following is an example after adding rules:

image (4).png

Between multiple rules, if a user who meets the rule hits the previous rules, they will get the value of the previous rule. If the user does not hit the previous rules, they will continue to judge whether the user hits the subsequent rules. If the user does not hit any rule, they will get the default value. Each rule can add population attribute tags to define users with these population attribute features. Among users who meet the conditions, you can set to only distribute values to a certain proportion of the population. This can help you gradually release features and control risks.

  • Add Whitelist You can add a whitelist to a specific rule, and users in the whitelist will be assigned to this rule. It helps your team to test whether the feature works.

Step 2 - View Feature Flags

image (5).png

On this page, you can click the name of a feature flag to view its details.

Step 3 - Associate Feature Flags with Experiment

image (6).png

You can create an experiment for the rules by clicking the "experiment button" on the right of this section. According to the results of experiments, you can determine which is the best value of this rule.

image (7).png

You can follow this guide: how to create an experiment to finish creating the experiment, and the participants in this experiment will be selected based on the rules you make.

Step 4 - Adjust Traffic for Experiments and Rules

image (8).png

You can adjust the traffic for experiments and rules on both the experiment and feature flag pages. When you are creating an experiment for the rules, you can only use the traffic that meets the conditions of these rules. Hence, the traffic of the experiment is the same as or less than the traffic of the rules.