Rollouts
The ScaleBun.rollouts namespace — 1 members.
import ScaleBun from '@scalebun/react-native';
ScaleBun.rollouts.<method>(…);Members#
| Member | Signature |
|---|---|
isOn | isOn(key: string) |
Reference#
isOn#
ScaleBun.rollouts.isOn(key: string)Notes#
Rollouts are percentage-based releases: a feature enabled for a share of users rather than all or
none. Same delivery path as flags — evaluated on the device from
delivered configuration — with a bucket decision instead of a straight boolean.
Bucketing must be stable per user#
This is the property that makes a rollout usable. The same user must land in the same bucket on every evaluation, or they see the feature appear and disappear between sessions — which is a worse experience than either state and makes any measurement meaningless.
Stability depends on the identifier being bucketed. If that identifier changes — because
identify has not run yet, or because it is derived from something per-session — the bucket changes
with it.
Ordering#
init(), then identify(), then read the rollout
In that order, for the stability reason above.
Stage the percentage upward, checking between steps
1%, 10%, 50%, 100% — watching crash rate and performance at each step. A problem found at 1% affects a hundredth as many people.
Keep the kill switch separate from the rollout
A rollout percentage is a release tool. Turning something off in an emergency is a flag, and you want that to be one action rather than a percentage edit.
Limits and edge cases#
Propagation is not instant. A percentage change reaches a device with its next configuration fetch.
Percentages are not exact at small n. A 10% rollout across 50 users will not be five users.
Reducing the percentage does not reliably remove the same users. Do not use a rollout decrease as a rollback; use a kill switch.
Evaluated client-side, so the rollout configuration is visible to anyone inspecting the app.