DEV Community

loading...

Discussion on: Deploy your first Serverless function in 5 minutes with Cloudflare Workers

Collapse
oguimbal profile image
Olivier Guimbal • Edited

I'm a fan of CF workers. However, I'd add that it's important to understand several things:

1) They're not Nodejs. They're actually kind of webworkers (they're implemented as v8 isolates like webworkers).
Meaning that you cant execute multiple js files (you must bundle them), you cant require node libs, or use node apis. That's a huge limitation.

2) Maybe it has changed, but I think they're limited to 50ms of actual CPU computation. Which is more than enough to do many things, but there is no way to perform heavy computations with that.

3) They're a REALLY fast. You get near zero cold starts (instead of ~100-300ms for an aws lambda running nodejs)

4) They run on the edge, which is sooo cool. You get the same performance everywhere in the world.

Collapse
harrisgeo88 profile image
Harris Geo πŸ‘¨πŸ»β€πŸ’» Author

Oh thanks for the extra info. I have to admit that I wasn’t aware of some of these details.

I don’t think that the intention in this blog is to tell people to switch their production apis to Cloudflare workers.

It’s more like how to get started playing with Serverless on your side projects.

Collapse
oguimbal profile image
Olivier Guimbal

I get that 😊. I just felt it was worth mentioning as a side note !

Collapse
kayis profile image
K

Didn't Workers Unlimited solve that CPU time restriction?

Collapse
oguimbal profile image
Olivier Guimbal

I guess it has, you seem to know better. I haven't checked for a while (thus my "maybe it has changed"). Thanks for the info

Forem Open with the Forem app