Percentage rollouts

Give a feature to a share of your users first, then widen it. Each person keeps the same answer, and widening never takes the feature away from anyone who has it.

A rollout turns a flag on for a percentage of people instead of everyone. Start at 5% or 10%, watch for problems, then widen it until everyone has it. Your code doesn’t change: getFlag, useFlag and isEnabled return true for people in the rollout and false for everyone else.

Start a rollout

On the Feature flags page, open the ⋯ menu on a flag and click Who gets it. In the panel, choose A percentage, then:

  1. Drag Roll out to, or pick a quick step: 0%, 5%, 10%, 25%, 50% or 100%.
  2. Click Save.

To give a flag to specific people first, choose Groups instead. See Groups.

The flag row then shows a percentage chip. Click it to change the percentage again. The slider moves in steps of 5%.

The flag still needs to be switched on. A flag that’s switched off is off for everyone, and the dashboard shows its rollout as paused. The percentage is saved and comes back when you switch it on.

Widen or roll back

The Rollouts page shows every rollout in the selected environment as a card (except “only them” groups flags at 0%), with its percentage, its history and, on Full Mast, its reach.

  • Widen, shown as for example Widen to 25% →, moves it to the next quick step: 5%, 10%, 25%, 50%, then 100%.
  • Roll back to 0% leaves the flag’s switch as it is, but nobody gets it. On Flagpole it also frees the rollout slot.

How people are picked

Each person gets a bucket from 0 to 99, worked out from a hash of the flag and their ID. The flag is on for them if their bucket is below the percentage. So at 25%, buckets 0 to 24 get it.

  • Stable answers. The same ID always gets the same bucket for a flag, on every request, server and device. Nobody flips back and forth.
  • Widening keeps people in. Going from 10% to 25% keeps everyone in buckets 0 to 9 and adds 10 to 24. Nobody who had the feature loses it.
  • Different flags, different people. The flag is part of the hash, so the 10% who get one flag aren’t the same 10% who get another.
  • Renaming is safe. The hash uses the flag’s internal ID, not its name.

The bucket is worked out in your app, and your users’ IDs never leave it. The exception is reach on Full Mast, which sends a pseudonymous fingerprint per person and flag, plus whether they got it on or off. See What Flaggish collects.

The ID

The SDK uses the userId you pass, if any. Otherwise it uses the anonymous flaggish_id cookie:

  • In Next.js, flaggishMiddleware sets the cookie on a visitor’s first request, so the server and the browser put them in the same bucket. See Next.js.
  • In React, the provider creates the cookie in the browser.
  • In Node, there’s no cookie. Pass userId or anonymousId to isEnabled and getAll. See Node.

The cookie lasts one year. With no ID at all, for example when cookies are blocked, the person isn’t in the rollout and the flag is off for them, unless it’s at 100%.

Signed-in users

Pass the user’s ID as userId, and a signed-in person gets the same answer on every device. Someone who browses anonymously and then signs in switches from their anonymous ID to their user ID, so their answer can change at sign-in.

What each percentage means

RolloutWho gets it
0%Nobody. The flag is on, but no one gets it yet: handy for checking it’s wired up.
5% to 95%About that share of people, each with a stable answer.
100%Everyone, including people with no ID. The same as a normal flag that’s on.

Finish a rollout

Once a rollout reaches 100%, finish it. Finish rollout turns it back into a normal flag. If the flag is switched on, it stays on for everyone.

Finish rollout is in the rollout panel on the Feature flags page. When a rollout is at 100% and the flag hasn’t changed for two weeks, the Rollouts page also lists it as ready to finish, with its own Finish rollout button. Any change to the flag, such as switching or editing it, restarts the two weeks.

Finishing a rollout below 100% makes the flag a normal flag too. If it’s switched on, the rollout panel asks you to confirm first, because everyone gets it straight away once you do. A paused rollout, with the flag switched off, finishes without the question. To take a feature away, use Roll back to 0% or switch the flag off instead.

Plans

PlanRollout flags
Flagpole (free)5 per project, counted across both environments
Full MastUnlimited

A flag uses one of the five slots while its percentage is above 0%, from when you start the rollout until you finish it, even while it’s switched off or at 100%. A flag at 0% never uses a slot, so Roll back to 0% frees one. A flag that goes to groups with Nobody else (“only them”) is at 0% too, so it doesn’t use a slot either; give everyone else a percentage above 0% and it does. When you’ve used all five on Flagpole, the dashboard lists your rollouts and lets you finish any that are at 100% to free a slot.

Locked by a schedule

While a flag is in a running schedule, you can’t change its rollout, or who gets it in the Who gets it panel, groups included. Remove the schedule first.

Was this page helpful?

Request early access

Become a beta user, or stay up to date with the project.