Product & innovation · Product strategy & innovation

Feature flags and staged rollout

Best for Startup to Growth

1PILOT 1%2WIDEN3FULL ON

Use it when

You are shipping a risky change to a live product and want a few users to get it first, watch the effect, and switch it off fast if it fails.

Skip it when

  • You need to know whether a change lifts a business metric, with a control group sized for significance. Use A/B testing framework.
  • You are still testing whether customers want the product at all. Use Lean Startup methodology, which staged rollouts can then serve.
  • You need the market launch plan, with messages, channels and dates. Use Launch strategy framework.
  • You need the pipeline that builds, tests and deploys code. Use Continuous integration/continuous deployment (CI/CD).

What to apply first and what to use instead are listed below.

Approaches

Percentage rollout

The flag serves the change to a random share of users, picked by hashing each user ID so the same users keep it, and the share rises in steps.

  • Pro Each stage is a fair sample, so exposed users compare cleanly with everyone else.
  • Con Users cannot choose, and important accounts may land in an early stage.

Ring rollout

The change opens to fixed groups in order, such as the team's own accounts, then customers who opt in to previews, then everyone.

  • Pro The first users expect rough edges and give feedback freely.
  • Con Early rings are small and unusual, so problems that appear only under real load can slip through.

Inputs

  • Change behind a flag
    The change wrapped in a flag whose off state keeps current behavior, from engineering.
  • Health metrics
    A short list of user-visible signals, such as error rate and latency, plus the usage signal the change should move, from monitoring and analytics.
  • Stage plan
    The users or share of users in each stage and the minimum time each stage runs, agreed by product and engineering.
  • Rollback rule
    The gap between exposed and unexposed users that pauses or reverses the rollout, and who makes the call.
  • Flag registerOptional
    Live flags with owner, type and removal date, from your flag tool.

Steps

  1. Put the change behind a flag whose off state keeps current behavior, and add a dated task to remove the flag.
  2. Write the stage plan and the rollback rule before the first user sees the change.
  3. Release to a small first stage, and compare its health metrics with unexposed users over the same window.
  4. Widen to the next stage only when exposed users match the rest on clear signals such as crashes and failed requests, and read slower signals such as usage in later stages.
  5. Switch the flag off at once if the rollback rule triggers, fix the cause and restart from the first stage.
  6. Remove the flag and the old code path once everyone has the change.

Output

A rollout log for one change that records each stage, its metrics against unexposed users and the decision taken.

  • Change and flag name
  • Stage and exposed group
  • Start and end dates
  • Health metrics, exposed versus unexposed
  • Usage signal
  • Decision (widen, hold or roll back)
  • Flag owner and removal date

Done when

  • The flag has an owner, an off state that matches current behavior and a removal date.
  • Every stage records its exposed group, dates and metrics beside unexposed users.
  • Every widen, hold or roll back decision cites the rollback rule.
  • The flag and old path are removed after full release, or a dated reason to keep them is logged.

Measure

Over the next two quarters, track failed releases, the share of users each failure reached and the time to switch a bad change off. Compare with your releases from before staged rollout. It worked when each failure reaches fewer users and is switched off in minutes without a redeploy. Count live flags each month as well, and act if the count keeps climbing.

Hypothetical example

Trailmark, a hiking app, rebuilt its route search behind a flag. The stage plan ran from staff accounts to users who opted into previews, then a random 10 percent, then everyone, with at least three days per stage. The rollback rule was a search error rate one point above unexposed users. Staff and preview users found two display bugs, fixed before the random stage. At 10 percent, errors matched the rest, but search slowed on busy weekends. The team held the stage, added caching and widened a week later. After full release, they deleted the flag and the old search code in the same sprint.

Common mistakes

  • Leaving flags in the code after full release. Give each flag a removal date and cap the number of live flags.
  • Judging the first stage on whole-service averages, which hide its failures. Compare exposed users with unexposed users directly.
  • Comparing the first stage with last week's figures. Compare it with unexposed users over the same window, since time adds noise.
  • Testing only the new path. Test the expected production setting and the fallback with the flag off.
  • Running several rollouts on one service at once. Run one at a time so each signal points to one change.

Sources

Show all 4 sources

By company stage

  1. Pre-IdeaNot applicableThere is no live product to release, so there is nothing to roll out in stages.
  2. IdeaUsefulA small user base can take risky changes directly, though flags give a cheap safety net.
  3. Early StartupUsefulEarly traction makes breaking changes costly, so flags help but the small base keeps rollouts simple.
  4. StartupCriticalHundreds of customers and faster shipping make staged release and quick rollback an important safeguard.
  5. GrowthCriticalThousands of customers across segments and regions need phased launches and holdouts to avoid wide outages.
  6. ScaleUsefulRelease tooling is usually mature by now, so flags are a standard practice that adds value without blocking progress.
  7. EnterpriseUsefulLarge engineering organizations normally have established release practices, and flags remain a useful tool within them.

Apply first

Nothing. You can start here.

Use instead

Recommended resources

No sponsored resources on this framework yet. Sponsored listings would be labelled here, never in search.

Progress is not saved until you have an account. Create a free account