Launched: Multivariate Feature Flags
LaunchDarkly has always supported boolean feature flags, which came with two pre-defined variations: true and false. This satisfied our customer's use cases for risk mitigation and end user control.
As our platform grew, so too did our customers' requests for more powerful ways to harness feature flags, like managing user plans, app configurations, and multiple variations of a feature.
To meet these use cases, LaunchDarkly now provides support for multivariate feature flags. A multivariate flag allows you to define two or more custom variations. These variations can be strings, numbers, JSON objects, or JSON arrays.
Creating a Multivariate Feature Flag
The next time you create a feature flag, you'll be able to specify which kind of flag you need: boolean or multivariate.
Here, we have created a multivariate flag that serves strings as variations. There is no limit to the number of variations you can add to a multivariate feature flag, making it very powerful for complex use cases and to manage two or more variations of a feature.
Multivariate Percentage Rollouts
Now, you can easily perform percentage rollouts using multivariate feature flags. In this example, 10% of users will receive one-click-checkout, 10% will receive two-click-checkout, and 80% will receive original-checkout.
Multivariate Individual User Targeting
We have also revamped our user targeting UI to support multivariate feature flag user targeting. This UI allows you to easily target individual users by key. In this example, email@example.com will get the one-click-checkout, firstname.lastname@example.org will get the two-click-checkout, and email@example.com will get the original-checkout.
Multivariate Rollouts Using Custom Rules
You can also create custom rules to serve variations based on any user attributes you send us.
In this next example, we have two rules. The first rule serves two-click-checkout to all users whose country is USA. The second rule targets users whose email ends with example.comand serves one-click-checkout to 50% and two-click-checkout to 10% of those users.
All users who have not been targeted in the custom rules or who have not been individually targeted will fall to the Default Rule.
In this next example, all users will receive original-checkout if they have not been individually targeted and have not matched any custom rules.
We hope you find multivariate flags useful. Send us feedback at firstname.lastname@example.org