Overview
Cloudflare Workers supports two deployment methods:- Standard Deploy - Upload and immediately deploy to 100% of traffic
- Gradual Rollouts - Upload versions and control traffic distribution
Standard Deployment
Deploy your Worker directly to production:- Bundles your Worker code
- Uploads it to Cloudflare
- Deploys immediately to 100% of traffic
- Updates all configured routes and triggers
Deployment Options
Example Deployment
Gradual Rollouts (Versions)
Gradual rollouts allow you to deploy new versions incrementally by splitting traffic between multiple versions.Upload a Version
First, upload your code as a new version without deploying:1
Upload the version
Create a new version with optional metadata:
2
Review version details
The upload returns a Version ID:
3
Preview the version
If preview is enabled, access your version at:
Deploy Versions
Deploy one or more versions with traffic splitting:- Select which versions to deploy
- Specify traffic percentage for each version
- Add an optional deployment message
Deploy Specific Versions
Shorthand Notation
Use the@ syntax for version-percentage pairs:
Version Upload Options
Traffic Splitting
When deploying multiple versions, traffic percentages must total 100%:Progressive Rollout Example
1
Deploy canary (5%)
2
Increase to 25%
3
Roll out to 100%
Deployment Settings
Versioned Settings
These settings are part of each version:- Worker code and modules
- Compatibility date and flags
- Bindings (KV, R2, D1, Durable Objects, etc.)
- Environment variables
- Secrets
- Placement configuration
- Cache settings
Non-Versioned Settings
These settings apply globally and are not version-specific:- Logpush configuration
- Tail consumers
- Streaming tail consumers
- Observability settings
wrangler versions deploy:
Triggers and Routes
Routes, custom domains, and cron schedules are managed separately:Deployment Workflow Comparison
Standard Deploy
- ✅ Simple and fast
- ✅ Automatic trigger updates
- ❌ No gradual rollout
- ❌ Immediate 100% traffic
Gradual Rollout
- ✅ Traffic splitting
- ✅ Safe incremental rollouts
- ✅ Version previews
- ❌ More steps required
- ❌ Separate trigger management
Best Practices
- Use Versions for Production - Gradual rollouts reduce risk
- Add Metadata - Use
--tagand--messageto track versions - Test in Preview - Verify versions before deploying
- Monitor Metrics - Watch error rates during rollouts
- Keep Stable Versions - Maintain a known-good version for rollback
Next Steps
Version Management
List and view version details
Rollbacks
Roll back to previous versions
Secrets
Manage Worker secrets