System design · interactive
Feature flags and gradual rollout
The new checkout is deployed but switched off. A flag decides, per user, who sees it: staff first, then a growing percentage. Users are bucketed by hashing their id, so raising 10% to 30% keeps the first 10% in and adds more.
Number: the user's hash bucket (0–99). Filled: sees the new checkout. Green outline: staff.
if (killSwitch) return false
if (user.isStaff) return true
return hash("new-checkout:" + user.id) % 100 < 1014 of 100 users on the new checkout
Users whose bucket is below 10 get it. Raise the slider: nobody who had it loses it, and nobody flips back and forth between page loads.
Staff first
Kill switch
1 2 Rules run in order. Try it on yourself first, then on a small slice of real traffic.
Watch errors and metrics per variant.
3 4
In production
Tools and technologies
Flag platforms handle targeting and rollout for you.
Not tied to one language — use these names when you search docs or design a system.