RU
Writing · Feature flags · 2026

Gradual rollout: shipping a feature to 5% of users

A gradual rollout is insurance. Strategies: percentage of users, segments, sticky sessions — and why determinism matters.

Shipping a feature straight to 100% of users bets all your traffic on one experiment and lets you learn about a problem at the same moment as everyone else. A gradual rollout turns the release from an event into a controlled process: 1%, then 5%, 25%, 100% — with the option to stop or roll back at any step.

The first and most important technical subtlety is determinism. The same user must land in the same group across requests and reloads, or the UI will “flicker”: new button, old button, new again. Hashing a stable identifier (userId, sessionId) solves it: take the hash, map it into the 0–100 range and compare with the current rollout percentage. That is what sticky sessions are.

It matters that the distribution is uniform and independent of an unlucky salt. So the identifier is usually salted with the flag name — then a user who landed in the 5% of one feature won’t automatically be in the 5% of every other, and cohorts don’t “clump.”

Next come segments and targeting. Beyond percentage, a rollout can be constrained: internal staff only, one region, a beta group, a certain plan. Unleash lets you combine several strategies in one flag — for example, “100% for staff AND 5% for everyone else.”

A gradual rollout only makes sense together with observability. At each step we watch the cohort’s metrics: errors, latency, conversion, business numbers. It helps to define guardrail metrics and a threshold that automatically rolls the release back when crossed — that is already a canary release.

Keep a “master switch” separately — an ops toggle (kill switch) that instantly disables the whole feature even if it’s long been at 100%. Under load this saves you: a heavy function can be turned off in a second without shipping a release.

Put together, the scheme looks like this: enable the flag at 1%, read the graphs, expand to 5% and 25%, confirm the metrics are fine, take it to 100% and delete the flag. If something goes wrong the percentage winds back, and the problem simply never reaches most users. A gradual rollout is, in essence, an insurance policy on every release.