mallets
mallets
CDCloudflare Developers
Created by cycle on 10/1/2024 in #workers-help
Can Cloudflare Workers Cron Support a 65-Second Script Running Every 2 Minutes?
That's almost all processing time then. Almost 1s per request and only 0.1s is the http time. CF workers might not be the right platform for something CPU intensive, likely much cheaper to use something like AWS lambda. Your nodejs code will likely work as-is too, workers doesn't have perfect node support.
11 replies
CDCloudflare Developers
Created by cycle on 10/1/2024 in #workers-help
Can Cloudflare Workers Cron Support a 65-Second Script Running Every 2 Minutes?
77ms request wait time or process time? If it's the latter, CF Workers is feasible. Not on free plan though, that is limited to 10ms CPU time.
11 replies
CDCloudflare Developers
Created by cycle on 10/1/2024 in #workers-help
Can Cloudflare Workers Cron Support a 65-Second Script Running Every 2 Minutes?
The point is that the majority of that time won't count towards your CPU time. You can fetch a file over 5s but it counts it as no more than 1ms. Only you would know what the actual processing part entails in your script.
11 replies
CDCloudflare Developers
Created by cycle on 10/1/2024 in #workers-help
Can Cloudflare Workers Cron Support a 65-Second Script Running Every 2 Minutes?
Your use case doesn't seem CPU bound, it likely spends most of that 65s waiting on http. Why not try it and check the stats.
11 replies
CDCloudflare Developers
Created by nejc on 9/30/2024 in #workers-help
Worker Environment
You shouldn't use it but there is no way around it sometimes. I use global variables to set a "first run" flag and fetch some (read-only) data only once per worker instantiation. Would be terribly slow if I keep fetching that piece of data every request. And don't say use KV or other offerings, trying to avoid unnecessary dependencies.
8 replies
CDCloudflare Developers
Created by Leon338 on 9/26/2024 in #workers-help
Did workers get slower?
49 replies
CDCloudflare Developers
Created by Leon338 on 9/26/2024 in #workers-help
Did workers get slower?
Well, this thread was informative. No wonder my workers run in a DC that pings 130ms when the closest one is just 5ms. Even the WARP unlimited VPN service terminates there
49 replies