A 10% rollout that flips users between two checkouts on every refresh
transcript
You release a new checkout to 10 percent of users. One user refreshes. Old checkout. Refresh. New. Refresh. Old.
First, the setup. The new checkout ships with its flag off. Users see nothing. Then you release in steps. 10 percent of users. Then beta users. Then everyone. Something wrong? Turn the flag off. Instant. No deployment.
But which 10 percent? A random draw on every request? Then the same user flips between old and new checkout on every refresh.
Instead, hash the flag key and the user ID together. That gives a fixed bucket, from 0 to 99. Bucket under 10? The new checkout. Anyone else gets the old one. Same user, same bucket, every time.
No table of who got what. The hash decides, the same way every time. A stable experience, with no stored state.
Hash the user. Don't roll the dice per request. Deploy any time. Release when ready.
Full breakdown in the lecture.