Percentage rollouts

How Flowyn percentage rollouts bucket an identifier deterministically into 0–9,999 so the same user always gets the same result, and how to widen a rollout safely.

How deterministic rollouts work

Flowyn hashes the flag's stable seed, the environment, and the caller's identifier into a bucket from 0 to 9,999. A percentage condition with a value of 2,500 basis points (25%) matches buckets 0–2,499. The same identifier always lands in the same bucket, so a user included at 25% stays included at 50%.

Configure a rollout rule

Rule
{
  "priority": 1,
  "conditions": [
    {
      "operator": "percentage",
      "value": 2500
    }
  ],
  "value": true
}

Evaluate

bash
curl -X POST https://api.flowyn.dev/v1/flags/evaluate \
  -H "Authorization: Bearer $FLOWYN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "checkout-v2",
    "identifier": "usr_142"
  }'
Response
{
  "key": "checkout-v2",
  "value": true,
  "reason": "percentage_rollout",
  "bucket": 1742
}

Widening the rollout

Raise the percentage from 2,500 to 5,000 basis points. Buckets 0–2,499 stay included and 2,500–4,999 are added. Nobody already included is removed. Setting it to 0 turns the rollout off for everyone not matched by an earlier rule.

Variants

For more than two outcomes, define variants with allocation_basis_points that add up to at most 10,000. The response names the variant it returned.

Limits

  • Send a stable identifier; without one the identifier is empty and every caller shares a bucket
  • Percentages are whole basis points from 0 to 10,000

Next step

Back to the Quickstart or the REST reference.