-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redesign Cloudflare cache purging #3410
Comments
I guess an interesting question would be, what would happen if we didn't purge the Cloudflare cache at all? One assumes that that may lead to getting stale pages/content (may even vary depending on what CF server you end up connecting to). Would new builds/releases not show up as 404 not founds are cached? We could temporarily comment out build/ansible/www-standalone/resources/scripts/cdn-purge.sh.j2 Lines 43 to 49 in 917f85f
|
Now that we have a CF enterprise account, we have more purging options available to us, but that still requires engineering work to determine what (if anything) needs to be purged and pass that information between |
The only thing I can think of that might need a low expiry would be the index.tab/json. I can't think of anything that really would need to be purged unless the cache got poisoned. |
Also directory indexes |
And for the website, all the generated html pages. JS and CSS chunks should be fine since they have content hashes in their file names. |
There are also all "latest" symlinks like https://nodejs.org/docs/latest, https://nodejs.org/dist/latest/, https://nodejs.org/dist/latest-v20.x/, etc. |
Note that we now have access to enterprise features such as: |
I think cache-tags may make sense for the website, but for releases/nightlies/v8-canary we'd probably need to do either URL prefix (most likely because of docs) or by URL. |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
I believe most of the server issues we're currently having with nodejs.org stem from our rather crude "purge everything" strategy. This is currently done by
ansible/www-standalone/resources/scripts/cdn-purge.sh.j2
(which runs every five minutes) if a purge has been locally queued.Purges are queued by calling
ansible/www-standalone/resources/scripts/queue-cdn-purge.sh
. This is done every time:build/ansible/www-standalone/resources/scripts/build-site.sh
Line 61 in 3221213
index.json
which triggers a website rebuild (I believe this is so the website picks up the most recent current and LTS releases for the download buttons/pages)build/ansible/www-standalone/resources/scripts/check-build-site.sh
Line 16 in 3221213
build/ansible/www-standalone/tools/promote/resha_release.sh
Line 28 in 3221213
build/ansible/www-standalone/tools/promote/_promote.sh
Line 61 in 3221213
To give an idea of frequency, these are the cdn-purges from today (including the Node.js 20.4.0 release):
The first two "promote"s are from the nightly build, the next three from the V8 canary, and the last "promote" (and "resha_release") from the manual promotion of 20.4.0. The subsequent "build-sites" are from merging nodejs/nodejs.org#5473 and nodejs/nodejs.org#5474 respectively.
Purging everything is rather heavy handed, but our current options in Cloudflare are to either purge everything (as we are doing) or purge a list of static URLs (there are further options only available for enterprise accounts which we do not have access to). Switching to a more selective cache purge requires us to determine what URLs to purge for all of the above scenarios that we are currently purging everything.
The text was updated successfully, but these errors were encountered: