Limitations in using Cloudflare Workers?
Hi. I'm planning on developing a mobile app with Cloudflare Workers as the serverless backend.
I would like to know if there are any gotchas or limitations I should know of as starter help 🤔
I'm planning on going with the paid Worker plan (new pricing) eventually, and the app is meant for a freelance client. My thought of going with Workers is to enable seamless scaling with high cost efficiency.
Thanks in advance ^-^
9 Replies
Welcome! There's no real major gotchas I can think of. Just make sure you're testing using
wrangler
, and be aware of any dependencies that you're using. There's often a misconception that Workers run Node.js, so any node modules will work, but that's not the case. So just be wary of that and things should go smoothly 😄Aah thank you so much ^-^
10ms cpu time on the freee plan, 50ms for the paid one.
- The default timeout is 100 seconds on any plan (apart from enterprise) , worker or tunnels get timed out if they don't return a response within 100 seconds.
- Use queues and other appropriate storage mechanisms based on your use-case
- Client needs to stay connected for workers to run (when worked is initiated because of a request_
Ooh, this is super helpful - thank you so much ^-^
The cpu time limits aren't typically a concern irl since it's cpu not wallclock time.
it's supposed to be I/O bound impl.
Is there any difference with creating a native mobile app and using Cloudflare Workers as the backend, compared to having a website as the frontend?
Not really. A backend should be frontend agnostic meaning the frontend used should be replaceable and not tied into the backend. Shouldn't matter but that's up to your software architecture/design.
@Mackenly Jones aah thank you ^-^