Worker Previews + version routing
Source & reproducible setup ↗
A hands-on Cloudflare Workers reference

Share the branch.
Replay the exact deployment.

Real Worker Previews give each branch its own configuration and a moving URL. Fixed deployment URLs let you revisit an earlier revision. Follow a live Worker → Worker request and verify exactly which versions execute.

2 Workers2 branch Previews per WorkerStable + fixed URLsBoth hops independently verified30 recorded checks passed
Recorded Preview · branch-ui

The branch moves. The fixed URL stays put.

Production is separate
Moving pointerStable branch URLbranch-ui
Latest deploymentbranch-ui-r2Version · 864f5825
Captured pointerOriginal fixed URLSaved at the first deployment
Retained deploymentbranch-ui-r1Version · 8d8ba16d
Recorded history: branch-ui-r1 → branch-ui-r2. The branch URL advances; the original fixed URL still replays the earlier deployment. Verify execution with the buttons below.
Dashed: follows latestSolid: captured deployment

Production and branch Previews

Every button calls a Worker first
Production

The public deployment

Creating or updating a Preview does not promote it to production.

https://worker-version-routing-target.dwarven.workers.dev
Open health ↗
Stable branch Preview

branch-ui

A separate Preview configuration. This URL follows the most recent deployment.

https://branch-ui-worker-version-routing-target.dwarven.workers.dev
Latest release
branch-ui-r2
Actual version
864f5825-a917-48a4-b20f-3e5ad320eff0
Open health ↗
Stable branch Preview

branch-api

A separate Preview configuration. This URL follows the most recent deployment.

https://branch-api-worker-version-routing-target.dwarven.workers.dev
Latest release
branch-api-r1
Actual version
12290029-9a01-444a-b870-c3e7aaa4d384
Open health ↗

A branch moves. Its history stays addressable.

Deployment ID ≠ assumed Worker version ID
Fixed deployment · branch-ui

branch-ui-r1

Earlier deployment retained after the branch advanced · compact configuration

https://8d8ba16d-worker-version-routing-target.dwarven.workers.dev
Deployment ID
8d8ba16d-4b8d-41d8-81c7-d82da0b531ee
Worker version ID
8d8ba16d-4b8d-41d8-81c7-d82da0b531ee
Open health ↗
Fixed deployment · branch-ui

branch-ui-r2

Latest captured deployment · detailed configuration

https://864f5825-worker-version-routing-target.dwarven.workers.dev
Deployment ID
864f5825-a917-48a4-b20f-3e5ad320eff0
Worker version ID
864f5825-a917-48a4-b20f-3e5ad320eff0
Open health ↗
Fixed deployment · branch-api

branch-api-r1

Latest captured deployment · detailed configuration

https://12290029-worker-version-routing-target.dwarven.workers.dev
Deployment ID
12290029-9a01-444a-b870-c3e7aaa4d384
Worker version ID
12290029-9a01-444a-b870-c3e7aaa4d384
Open health ↗

Pin the whole request chain

Same caller URL, different downstream guarantees
Caller pinned · target moving

One fixed hop is not enough.

The caller's revision-1 deployment is fixed, but it fetches the stable target branch URL. The target now runs branch-ui-r2.

Fixed callerbranch-ui-r1Version · e073881f
Moving target URLStable branchbranch-ui
Expected targetbranch-ui-r2Version · 864f5825
Recorded expectation · public HTTP at every hop. Same caller, latest branch target. Short version IDs are shown; the response below proves the full execution identities.
https://e073881f-worker-version-routing-caller.dwarven.workers.dev
Caller pinned · target pinned

Replay the exact request chain.

Use the same caller deployment with its captured fixed target URL. The target still runs branch-ui-r1.

Fixed callerbranch-ui-r1Version · e073881f
Captured target URLFixed deploymentbranch-ui-r1
Expected targetbranch-ui-r1Version · 8d8ba16d
Recorded expectation · public HTTP at every hop. Same caller, same original target. Short version IDs are shown; the response below proves the full execution identities.
https://8d8ba16d-worker-version-routing-target.dwarven.workers.dev

Both buttons invoke caller version e073881f-3046-4131-8a53-275c9c044f1a. Compare the target version IDs in the response panel. Fixed URLs pin executable deployments; they do not snapshot external data.

Call a specific version through a service binding

Both buttons use the caller's TARGET.fetch() binding. Without an override, all default traffic goes to the production version. With Cloudflare-Workers-Version-Overrides, the same binding reaches the candidate at 0%.

Compare the requested header and the downstream CF_VERSION_METADATA.id below. The target version must be in the active deployment. Overrides work on fetch() calls, not RPC. Read the service binding docs ↗

Live request evidenceNo request yet
Choose a branch, fixed deployment, or paired request above.

Ready to verify both execution identities.

Advanced: exact uploaded versions and the 0% production candidate

Version URLs inspect an uploaded version with its production resources. A fetch-style service binding and version override can select a version in the current production deployment, including one allocated 0% traffic. These are separate from branch Previews.

Production caller · three routes

An upload address and a version override take different paths.

01 · Default traffic
Caller WorkerNormal requestNo version selector
Public HTTPProduction URLNormal deployment routing
Active deploymentProduction version100% default traffic
02 · Address an upload
Caller WorkerUpload / alias requestSelect an uploaded version
Public HTTPVersion URL / aliasUpload's production configuration
Addressed uploadUploaded versionCandidate example · 114b0a72
03 · Select the 0% candidate
Caller WorkerVersion overrideSelect the candidate's UUID
Service bindingfetch() + override headerCloudflare-Workers-Version-Overrides
Active deploymentCandidate version0% default traffic · explicitly selected
Version URLs can reach uploads outside the active deployment. The override requires a version in that deployment; 0% describes its default traffic allocation, not its availability to an explicit override.
Specific uploaded version

The 0% candidate

Call its fixed Version URL, or select its exact version through the production service binding.

114b0a72-worker-version-routing-target.dwarven.workers.dev
Upload alias · not a branch Preview

A moving version alias

An alias addresses an uploaded production-configured version. It does not create a separate Preview environment.

candidate-worker-version-routing-target.dwarven.workers.dev

10 uploaded versions, each independently callable

lab-01dcf7a777-1e27-4cb9-9a8f-13aa2955841b
lab-028c9290ee-ee76-42f9-932c-fcd4eca48f32
lab-0347b98124-5189-470e-8d01-c1d2bbd99b52
lab-0402f77aaa-454f-47eb-889b-0b5c57a8dbb4
lab-05cd0beb62-7d57-425b-bed1-f63769d02cd3
lab-06e29891bb-a884-438a-bc2a-f924013ecc24
lab-076e14001d-2250-4373-91f0-f7be5c90f517
lab-0812dd1287-674d-4b18-8181-adcad01b6537
lab-0934bae4a8-8ad5-4d63-a662-a2a9f23f1598
lab-10146d69f9-6a45-4c4b-a08f-0dcccecd6e80

Preview configuration and resources

Preview vars and bindings are explicit. Durable Objects and Containers get per-Preview resources; KV, D1, and R2 remain shared when bound to the same resource. This stateless lab proves configuration and execution routing.

Observability and the public edge

Inspect each Preview's logs and traces in the dashboard, using the response trace ID. HTTP pairing uses global_fetch_strictly_public; Preview service bindings resolve to production.