If you see the pricing section of Cloudflare Workers here in the free plan they have the following
Up to 10ms CPU time per request
and in paid plan following
Up to 30s wall time per request
Typically it takes more time than 10ms to execute a script that does something useful. Even 30s wall time can be short depending on the task.
If you look at Worker's documentation limits: CPU runtime section it has
Most Worker requests consume less than a millisecond. It is rare to find a normally operating Workers script that exceeds the CPU time limit. A Worker may consume up to 10ms on the free plan and up to 50ms for Bundled Workers on the Paid Plan. The Paid Plan also offers up to a 30 second duration for increased compute time. The 10ms allowance on the free plan is enough execution time for most use cases including application hosting.
There is no limit on the real runtime for a Workers script. As long as the client that sent the request remains connected, the Workers script can continue processing, making subrequests, and setting timeouts on behalf of that request. When the client disconnects, all tasks associated with that client request are canceled. You can use event.waitUntil() to delay cancellation for another 30 seconds or until the promise passed to waitUntil() completes.
While in generic sense meaning of CPU time, Wall time mentioned in this post are correct. I do not think it is the accurate meaning in this context, since in the post linked, CPU time is the code execution time either in kernel or user space.
CPU time per request
is not similar to the code execution CPU time in AWS Lambda either, since it mentions following
There is no limit on the real runtime for a Workers script.
So script real runtime (ie: CPU execution time) is not limited to 15 minutes like in AWS Lambda.
Then
- What is 10ms CPU time per request in Cloudflare workers?
- And what is the 30s wall time per request mentioned in the paid plan?