Hacker News new | ask | show | jobs
by brendanmc6 1911 days ago
Wow this was extremely informative for me! Cleared up a cacheing concern I had. Thanks for sharing.

I've had good success using the free tier of Vercel functions to handle the low-traffic storefront and user accounts for offsetra.com - Just wrapper functions around stripe and firestore. It's a godsend for independent, unskilled, time-constrained front-end devs like me!

2 comments

One important piece missing from this article is that on Vercel you do not get global Serverless functions on any plan except the Enterprise plans. By default you can pick one preferred region for your Serverless functions and that's the region that's always used. In practice, assuming you have a somewhat decent caching strategy, this doesn't really matter as far as latency is concerned. Where it could potentially matter is that AWS region having an outage and now you can't fallback to another. We deploy all our functions to at least two regions and Vercel does handle region failover in this case.

Disclaimer: I'm a Vercel enterprise customer

Unless it was edited later, its in there about 1/4 of the way down.

"Vercel doesn’t replicate Functions across their Network in Free and Pro accounts - Functions can be deployed to one particular region only. Enterprise plan users can specify multiple regions for Serverless Functions."

Right. It's not missing. I pointed that out in the "Serverless Functions requests handling" section, also visually
If you store data in firestore, dynmodb, postgres or similar.. does it really matter if the function is distributed?
If there is no cached data, then it doesn't matter.

With Vercel it doesn't matter even in case there is valid cached data, because Vercel doesn't execute the function in that case.

Cloudflare always executes the Function regardless of the existence of cache and it's Function's responsibility to respond with Cached data. Hence, distributed Cloudflare functions is a necessity.

Thanks for feedback! Caching... it took me time to get my head around it. With Vercel it works more or less the way I imagined. It surprised me that Cloudflare has a different approach. But once I got it, it started making sense and I like it :)

Good luck with your project!