Cloudflare Workers - `wrangerl` or `serverless`?

Hello! I’m evaluating using Cloudflare Workers for a client who has Cloudflare Enterprise. TBQH I’m not familiar with the enterprise offerings of Cloudflare, but perhaps in this situation it is irrelevant (?).

Question is this: In the past I’ve used the serverless framework for deploying to Azure Functions as well as AWS Lambda / API Gateway. I see there is documentation and a serverless plugin however it appears to have not been updated for a number of years.

wrangler on the other hand appears to be much more active.

I’m wondering if there is a clear choice here - we are just evaluating options at this point, but I suspect we’ll likely end up with something like an express app. Again, this very well may not matter.

Any input would be super helpful!

Thank you!

Looks like that serverless plugin is generally unmaintained, although I imagine they’d merge some Pull Requests if they received some to fix the issues.

The Serverless framework itself has generally fallen out of style in the dev community largely due to how serverless’ promise of “platform-agnostic serverless functions” never worked out since you either need to test every platform on every deploy (and write configuration for each platform) or you need to keep your functions super simple. A lot of serverless platforms are different as well - while you can get up to 15 minutes of execution time on other serverless services like AWS, Cloudflare workers has (had) a 50-millisecond runtime limit, in addition to how it didn’t spawn a filesystem, so you couldn’t use most node modules that existed at the time. Nearly all existing serverless applications couldn’t be ported over without complete rewrites.

It turns out that it’s almost always easier to develop serverless applications when you use the first-party tooling that the provider makes available, like AWS SAM, gcloud run, and yes, Wrangler. While other platforms seem to have work being put into the platform’s Serverless plugin, I don’t remember SLS ever being too popular in the Workers community, so chances are the userbase for it is very small.

So, if you can, I’d recommend looking at Wrangler instead of that serverless plugin just because it isn’t receiving maintenance and nobody is submitting PRs to keep it up themselves.

This is very similar to what you’re probably looking for - a workers-based request router: Open-Sourced Workers Router (TypeScript) - cloudflare-router

1 Like

Thanks a ton for the response!

This all makes sense, and I will go forward with Wrangler in mind.

Very much agree: re serverless nto really being platform agnostic. It’s basically AWS or you’re at like 5% utility. I worked for a while to try to contribute to some OpenWhisk plugins but ended up giving up.

Also, thanks for the link to the worker route. Seems like it will be worth considering over express. Express truly isn’t likely what we’d end up using, most of the functionality probably isn’t needed. SO yeah, this could be perfect.

Thanks again!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.