Quick question about CPU limit on Pages Functions
I'm running an Astro app and it's not unusual for it's functions to run longer than 50ms (it was the old limit iirc). Now, there's a "No CPU limit set" and a button to change it.
I just want to know how that works now, will longer requests be counted as multiple invocations or it's just Cloudflare being super generous lately xD
5 Replies
That sounds like it's related to this: https://blog.cloudflare.com/workers-pricing-scale-to-zero/
The Cloudflare Blog
New Workers pricing — never pay to wait on I/O again
Detailed pricing information here: https://developers.cloudflare.com/workers/platform/pricing/#workers, under the "Standard" usage model.
In short, you'll be paying less per request but you'll now be charged for CPU time seperatly. If you don't have a lot of CPU it's probably cheaper, if you do, it might be more expensive. You'll have to see for your usecase specifically
the blog page returns 500 status. interesting..
Huh, it works for me 🤔
okay, I think I got it. will do some math to figure out the resulting cost. thanks!
looks like cloudflare just counts overage time as more requests. i'll do more tests but for now it appears that it just counts one 44 ms request as 4 (10ms ones????)
now it doesn't do that 🤣