The gist is (which the support engineer referred to as the internal RFC): instead of stripping `cache-control` `s-maxage` / `stale-while-revalidate` values, we should support Targeted HTTP Cache Control[1] (i.e.: `cdn-cache-control` and `vercel-cache-control`). Vercel strips them because (1) at the time this RFC didn't exist and (2) most of the time you we found customers don't want to cache on the browser side or pr…
We Need To Talk About Vercel
21–30 of 161 posts
Re: We Need To Talk About Vercel
#22The gist is (which the support engineer referred to as the internal RFC): instead of stripping `cache-control` `s-maxage` / `stale-while-revalidate` values, we should support Targeted HTTP Cache Control[1] (i.e.: `cdn-cache-control` and `vercel-cache-control`). Vercel strips them because (1) at the time this RFC didn't exist and (2) most of the time you we found customers don't want to cache on the browser side or pr…
Cloudflare (and likely other cdns) has a development mode for this exact use case
I've seen a lot of customers get burn by sending `max-age` as a way of getting their CDN to cache, not realizing they're inadvertently caching on users' machines. Sometimes it's a seemingly harmless "5 minutes", but that can be damaging enough for rapidly changing pages (imagine breaking news on a homepage).
Re: We Need To Talk About Vercel
#23I know Cloudflare doesn't. I thought Vercel did but apparently not.
Re: We Need To Talk About Vercel
#24Does any CDN support stale-while-revalidate? I know Cloudflare doesn't. I thought Vercel did but apparently not.
Re: We Need To Talk About Vercel
#25If anyone needs a CDN, please use BunnyCDN. I have tried almost every other major CDN and it just blows everything else out of the water. Regarding Vercel, they do have quite poor support so it doesn't feel rock solid and dependable. They are a great start though, but then ideally you should just switch to bare metal on Hetzner or something when you are earning serious money from your business.
Re: We Need To Talk About Vercel
#26Earlier quoted context omitted.
Having someone handle multiple points of presence is a nice courtesy to users. Not sweating about outages is worth a lot. Someone else handling botnets & DDoS is fantastic. I very very much believe in some DIY & doing things ourselves but I also recognize a ton of value in using CDNs. Glad both are options. DIY is hard.
A cdn is largely a value prop to reduce latency for static web pages, so that someone coming from a link get a page load asap. Once you have a dynamic or hybrid app, the value diminishes rather quickly, I assume. Potentially it could become negative if you have different points of failures and cache inconsistencies.
Unless CloudFlare cables are somehow shinier than the rest of the internet’s, adding one hop almost certainly adds latency. More hops more time.
In some instances where the original server was closer than CF’s edge, I measured increased time even for cached content, effectively making CF slower for every request by that specific user.
Re: We Need To Talk About Vercel
#27Re: We Need To Talk About Vercel
#28Re: We Need To Talk About Vercel
#29Earlier quoted context omitted.
Cloudflare (and likely other cdns) has a development mode for this exact use case
Unless I'm misunderstanding you: it's not about dev or prod. It's that you want Vercel to cache a dynamic page, but not your visitor. That allows you to be in control of the ship: if you purge the CDN, you don't risk a customer having a stale page. I've seen a lot of customers get burn by sending `max-age` as a way of getting their CDN to cache, not realizing they're inadvertently caching on users' machines. Sometime…
Re: We Need To Talk About Vercel
#30My sense of Vercel (mostly from working with NextJS) is that they are more interested in appearing to support an open source framework while making their product as difficult to interoperate with other technologies as possible in an attempt to lock users into their platform and hopefully pay for it.