Gradually roll out a new version to a percentage of traffic

versions & rollback

// what it does

The `<version-id>@<percentage>` shorthand deploys multiple versions at once with a traffic split. Send 10% to the new version and 90% to the old one to canary a risky change, watch your metrics, then dial it up. The percentages must total 100.

// shell

$ wrangler versions deploy <new-version-id>@10 <old-version-id>@90

// gotcha

Splitting is random per request, not sticky per user, so a given user may bounce between versions — don't use it for stateful or session-dependent changes. Both version IDs must be listed explicitly; the split does not remember the previously deployed version for you.