Repository navigation
Support multi-version deploys or --old-asset-ttl for wrangler versions deploy
#13349
Replies: 3 comments 2 replies
|
Hi @bmbferreira, glad to announce that we are working on this! I am a Product Intern here and my main focus is getting skew protection (& multi-version routing) support into Cloudflare Workers! If you had 30 minutes over the next few days for me to get your thoughts on how we do skew protection, that would be great - would you be able to find a time here https://calendar.app.google/Sp2W1SVdPbXkKEED6 |
|
Hey guys, any update on this? |
|
We recently migrated from Cloudflare Pages to Cloudflare Workers, believing it would work at least as well and for certain things better. But the version skew issues we are now facing means that we have to consider rolling back to Pages. During deploy the static assets of the new version result in 404 responses, and these 404 responses are cached in Cloudflare. The result is a broken page, since it fails to load the static assets. Purging the cache also fails to remove these static assets, for some reason. There is a lot of documentation for version skew protection, but most of it deals with split deployments. During deploy the documentation simply claims "During propagation, one location can serve B's HTML. The asset request can then reach a location still using A" and "The deployment change still takes time to reach every location". So, there is no way to work around this issue? The best case scenario is a short period where the static assets 404, and then hopefully they don't get cached, so that a simple refresh resolves them? |
Uh oh!
There was an error while loading. Please reload this page.
Description
We deploy Cloudflare Workers multiple times per day and are currently running into issues with asset invalidation during version rollouts.
When deploying new versions using
wrangler versions deploy, older static assets can become unavailable too quickly. This leads to situations where users with an already loaded application (SPA) experience broken states unless they refresh their browser.We would like a way to keep older versions (or at least their assets) available for a longer period to ensure smooth transitions between deployments.
Problem
Currently:
Given that we deploy frequently, this negatively impacts user experience.
Proposed Solutions
Option 1: Multi-version deploy with traffic allocation
Allow deploying multiple versions at once with explicit traffic weights, for example:
The main issue is that this is currently limited to 2 versions, we would like to have more versions available.
This would:
Option 2: Support
--old-asset-ttlforversions deployExtend
wrangler versions deployto support:This would:
Why this matters
References
All reactions