Flag Types

Flag types are essential tools for modern software development, enabling teams to manage feature releases, control access, and run experiments. By using conditional code execution based on release conditions, flag types provide flexibility and control over the software development lifecycle.

The three key flag types are:

  1. Release flags: Enable features for specific user segments or percentages, allowing for controlled rollouts and risk mitigation.

  2. Permission flags: Control access to features for specific users or groups, simplifying user management and testing.

  3. Experiment flags: Compare multiple feature versions to monitor their impact on key metrics, enabling data-driven decision-making.

Understanding and leveraging these flag types is crucial for effective software development and product management. They allow teams to ship faster, maintain momentum, and gather valuable insights to improve the user experience.

Release flags, for example, enable teams to perform beta testing, canary releases, and gradual rollouts. This approach reduces risk by limiting exposure to new features and allows for quick rollbacks if issues arise.

Permission flags, on the other hand, simplify user management by controlling access to features based on user roles or groups. This is particularly useful for managing premium features or throttling access to prevent abuse.

Experiment flags enable teams to make data-driven decisions by comparing the performance of different feature versions. By monitoring the impact on key metrics, teams can optimize features and improve the overall user experience.

Release flags

Release flags enable teams to control the rollout of new features to specific user segments or percentages. This approach allows for beta testing, canary releases, and gradual rollouts, reducing risk and enabling faster shipping.

By using release flags, teams can:

  • Perform controlled rollouts to a subset of users, monitoring for issues and gathering feedback.

  • Quickly roll back problematic features without deploying new code, minimizing downtime and user impact.

  • Ship features faster by separating deployment from release, allowing non-developers to manage rollouts.

Release flags are particularly useful for managing high-risk features or changes that require extensive testing and monitoring. They provide a safety net, enabling teams to ship with confidence and maintain momentum.

Permission flags

Permission flags control access to features based on user roles, groups, or other attributes. They simplify user management and enable easier testing of features in production environments.

By using permission flags, teams can:

  • Manage access to premium features without modifying custom user fields or admin panels.

  • Throttle or prevent access to features for users who abuse them, maintaining system stability and performance.

  • Run alpha and beta tests without requiring bespoke code changes for each feature.

Permission flags streamline user management and provide granular control over feature access. They enable teams to test features with specific user groups and gather valuable feedback before releasing to a wider audience.

Experiment flags

Experiment flags, also known as A/B testing flags, enable teams to compare multiple versions of a feature and monitor their impact on key metrics. This data-driven approach allows for feature optimization and improved user experience.

By using experiment flags, teams can:

  • Test different variations of a feature, such as button colors or pricing tiers, to determine which performs best.

  • Monitor the impact of feature variations on key metrics, such as conversion rates or engagement.

  • Make data-driven decisions based on real-world user behavior, rather than relying on assumptions or gut instincts.

Experiment flags are essential for creating a culture of continuous improvement and optimization. They enable teams to validate hypotheses, learn from user behavior, and make informed decisions that drive business growth. Release flags enable features for specific user segments or percentages. They're commonly used for beta testing, canary releases, and gradual rollouts. Release flags allow you to ship faster, mitigate risk, and perform easier rollbacks.

Release flags separate deployment from release, letting you ship code without releasing it to everyone immediately. This reduces the burden on developers and allows other team members to manage releases. If issues arise, you can quickly roll back without involving multiple team members.

Release flags help mitigate risks by enabling slower rollouts and faster rollbacks. Percentage, conditional, or tiered deployments let you focus on specific areas, reducing overall risk. If problems occur, release flags act as kill switches to turn off features without deploying new changes.

There are several types of rollouts you can perform with release flags:

  • Percentage rollouts: Release a feature to a percentage of users/groups and increase over time.

  • Conditional rollouts: Release a feature to specific users/groups based on a filter or condition.

  • Tiered rollouts: Release a feature to specific infrastructure, regions, groups, or users, and progress over time.

Release flags also enable better testing in production environments. This means the usage, data, infrastructure, and environment are closer to what users will actually experience, providing more accurate validation.

Permission flags

Permission flags grant or deny access to features for specific users or groups. They reduce the need for custom user fields and admin panel modifications. Permission flags also enable teams to run alphas and betas easily without needing bespoke code changes for each feature.

Some common use cases for permission flags include:

  • Putting premium features behind a permission flag and managing access through sales or customer success teams.

  • Throttling or preventing access to parts of an app for users who abuse features.

Experiment flags

Experiment flags, also known as A/B test flags, compare two or more versions of a feature or component for users or groups. They monitor the impact variations have on key metrics and roll out the winning variation.

Experiment flags are useful for testing changes and determining the best-performing variation. Some examples of experiment flag use cases are:

  • Running experiments with multiple variations of a pricing table to determine which version converts best.

  • Testing a feature's integration in production by shipping it behind an experiment flag.

JSON flags

JSON flags allow you to send a map of values, which is useful for changing the user experience without deploying code. JSON object and array flags have a size limit of 32KB. Your feature flagging tool should show an error if a variation value does not validate as proper JSON.

JSON flags are particularly helpful when you need to modify complex data structures or configurations without a code deploy. They provide flexibility and control over the user experience.

Choosing the right flag type

When deciding which flag type to use, consider your specific use case and requirements. Release flags are best for gradual rollouts and risk mitigation, while permission flags excel at managing access. Experiment flags are ideal for testing variations, and JSON flags provide flexibility for complex data structures.

It's essential to choose a feature flagging tool that supports the flag types you need. Look for a tool with a wide range of flag types, robust targeting capabilities, and an intuitive user interface. A good feature flagging tool will make it easy to create, manage, and retire flags as needed.

Join the #1 experimentation community

Connect with like-minded product leaders, data scientists, and engineers to share the latest in product experimentation.

Try Statsig Today

Get started for free. Add your whole team!

What builders love about us

OpenAI OpenAI
Brex Brex
Notion Notion
SoundCloud SoundCloud
Ancestry Ancestry
At OpenAI, we want to iterate as fast as possible. Statsig enables us to grow, scale, and learn efficiently. Integrating experimentation with product analytics and feature flagging has been crucial for quickly understanding and addressing our users' top priorities.
OpenAI
Dave Cummings
Engineering Manager, ChatGPT
Brex's mission is to help businesses move fast. Statsig is now helping our engineers move fast. It has been a game changer to automate the manual lift typical to running experiments and has helped product teams ship the right features to their users quickly.
Brex
Karandeep Anand
President
At Notion, we're continuously learning what our users value and want every team to run experiments to learn more. It’s also critical to maintain speed as a habit. Statsig's experimentation platform enables both this speed and learning for us.
Notion
Mengying Li
Data Science Manager
We evaluated Optimizely, LaunchDarkly, Split, and Eppo, but ultimately selected Statsig due to its comprehensive end-to-end integration. We wanted a complete solution rather than a partial one, including everything from the stats engine to data ingestion.
SoundCloud
Don Browning
SVP, Data & Platform Engineering
We only had so many analysts. Statsig provided the necessary tools to remove the bottleneck. I know that we are able to impact our key business metrics in a positive way with Statsig. We are definitely heading in the right direction with Statsig.
Ancestry
Partha Sarathi
Director of Engineering
We use cookies to ensure you get the best experience on our website.
Privacy Policy