Feature Flagging at Prefect
At Prefect, our users' voice is important to us. Our products are built on our users' valuable feedback, and we embrace an iterative process of constant improvement. To deliver on this goal, we reflected on our tools and processes, and we identified a bottleneck: our feature flags.
Feature flagging is important for many reasons. It allows our developers to decouple code deployments, reduce risks, enable faster development cycles, and supports a feedback loop by collaborating with key partners in validating new features before releasing them to the general public.
By improving our feature flagging process, we are able to meet our goals:
-
rapidly deliver features,
-
target users for early feedback, and
-
gradually roll out for safe adoption.
Our initial problem
As our users and product scope grew exponentially, our initial approach to feature flagging was an in-house solution in order to meet our needs and fulfill our deployment goals.
There were several issues to this approach:
-
Feature flags needed to be maintained as code, leading to slower development times due to going through a software development cycle.
-
Targeting certain users for each feature flag was not straightforward. Our internal system was based on the user's side rather than the feature flag's side. This means that you could only target feature flags based on the user - in contrast to the modern solution where you can target users based on the feature flag. Ultimately, this issue made it difficult to maintain multiple feature flags with various user groups.
Below was our initial feature flag process using our in-house solution:

What we did
Today, we've migrated our feature flagging tooling to LaunchDarkly. LaunchDarkly is a platform where organizations can create projects, and within those projects, they can create feature flags on demand using the LaunchDarkly web app.
Additionally, developers can group individual users into segments, which can then be used as targeted groups under a feature flag deployment rule.
Lastly, within a feature flag, you can create different environments per flag, and create targeting rules on how the feature flag should be released depending on the environment.
For our use case, you'll see that we first deploy a feature flag into production, and only target our Internal Prefect Users Segment. Once the feature is an MVP, we enable the feature to our external partners, where we collaborate and iterate based on the provided feedback. This helps us validate if we're building a strong foundation before fully releasing a feature to all users. Once we are feature complete, we then enable the feature flag to all users and begin swiftly cleaning up the feature flag - this step only happens once the release has stabilized.
Below is our current feature flag workflow:

How it helps us collaborate with you
We are extremely satisfied with our migration to LaunchDarkly. We are able to closely collaborate with our users, and together, build versatile features that make our product valuable for you to use. This migration is one of the many things that we are re-evaluating so that we can build faster and more strategically. If you would like to partner with us, we invite you to join our community today.
To learn more about Prefect
-
Visit prefect.io
-
Explore Prefect on GitHub to open issues and pull requests
-
Follow Prefect on LinkedIn for regular updates
-
Join our active Slack community