Re:Vercel Serverless Functions vs. Cloudflare Workers
by zackbloom on Thursday March 25, 2021 @06:34PM
(#26586469)
It's often not actually more complex, it's simpler. With Cloudflare Workers, for example, you don't think about regions, availability zones, provisioning resources, or cold starts. You just write code, and it can scale from one request per second to thousands without any thought or work on your part, partially because of how its designed and partially because it's scaled across so many locations and machines.
[ Parent
| on HN ]
Re:Vercel Serverless Functions vs. Cloudflare Workers
by MuffinFlavored on Thursday March 25, 2021 @07:38PM
(#26587050)
> You just write code
Except you need to do it in a totally new paradigm (serverless) where you can't require any `npm` packages and you can't query your database unless it's over the `fetch()` API.
Re:Vercel Serverless Functions vs. Cloudflare Workers
by fragile_frogs on Friday March 26, 2021 @07:41AM
(#26590882)
> where you can't require any `npm` packages
You just have to introduce a build tool like ncc (https://github.com/vercel/ncc) which will bundle your app into a single JS file.
Re:Vercel Serverless Functions vs. Cloudflare Workers
by alexey2020 on Friday March 26, 2021 @03:07AM
(#26589519)
Serverless are not all the same.
Cloudflare uses V8 and you can't require npm packages, right.
Vercel and many other implementations use NodeJS and you Can require npm packages.
Re:Vercel Serverless Functions vs. Cloudflare Workers
by jopsen on Thursday March 25, 2021 @08:24PM
(#26587449)
And you're limited to 50 sub-requests..
Re:Vercel Serverless Functions vs. Cloudflare Workers
by alexey2020 on Friday March 26, 2021 @03:12AM
(#26589541)
if it's a real issue and you have to issue lots of subrequests, then you don't really get advantage from all Cloudflare micro-optimisations.
In such situation I would suggest to look for other Serverless providers, or maybe traditional approach works better in such case