Worker sites vs pages
Hello there everybody!
I've come here with a big question after exploring https://developers.cloudflare.com/workers/platform/sites/
What is the big difference between worker sites and cf pages?
Workers Sites · Cloudflare Workers docs
Workers Sites enables developers to deploy static applications directly to Workers. It can be used for deploying applications built with static site …
16 Replies
It can be thought of as the precursor to Pages, and uses https://github.com/cloudflare/kv-asset-handler to allow you to easily bundle and serve web assets in KV with your Worker or run an entire website on Workers+KV. It was a lot more complex to setup and use, and didn't provide a built-in CI/CD, opinionated defaults or file-based routing like Functions has.
These days there are not a lot of reasons to use Workers Sites, because Pages + Functions will manage almost all of the same things you could have done, and costs less (no cost for static assets on Pages)
speed wise, are they the same?
Should be the same since theyre doing very similar things, Pages is also built on Workers and also uses KV on the backend
interesting
lastly, what If I want to use http3 in workers?
For serving a Worker on http3? Should work on a custom domain/route but won't work on
workers.dev
Ok
if i'm in that specific domain
and have enabled the http3
anything else I should do?
one more thing, is kv and r2 similar in speed?
might take a few refreshes. HTTP3 isn't something that can be upgraded to during the initial connection like http2 is. Looks like some browsers wait until the existing tcp connection dies to switch, and some switch more aggressively
No, KV is faster, R2 is slower, much slower if you don't manually cache it. R2 has a single origin, and does not cache by default. KV has two central stores (1 in EU, one in US) and each colo your worker runs in/fetches the KV value will cache it, for a minimum of 60s. KV 2.0 (WIP) even revalidates it in the background, letting you set a cache of days and having changes still be reflected within a minute or so.
There are other reasons you might pick R2 though. It is cheaper, supports larger files/values then 25MB, and is strongly consistent.
https://developers.cloudflare.com/workers/platform/storage-options/
I've enabled it about a week ago
what's your domain?
warpfactor.co
Are you sure? That website isn't returning the
alt-svc
headerhmmm
let me check again
It's under Network -> third result down, HTTP/3, if it helps
thx
it wasn't
sorry
no worries, welcome to http/3 🙂
thx