Cloud//Cloudflare//Workers//CPU time
The time a Worker actually uses the CPU. NOT the same as wall time (total elapsed time from request to response).
The time a Worker actually uses the CPU. NOT the same as wall time (total elapsed time from request to response).
CPU time: code actively running on the processor — parsing JSON, computing, transforming data
Wall time: total time including waiting for network (fetch to an API, reading from D1, calling R2)
Waiting on network does NOT count as CPU time. A Worker can fetch from 10 APIs and only use 5ms of CPU.
Free plan: 10ms CPU time per invocation. Paid: 30s default, up to 5 minutes max.
10ms sounds tiny, but for edge logic it's plenty: routing, auth/JWT, header manipulation, cache decisions, rate limiting, small API responses. These are sub-millisecond operations.
Why so limited: V8 isolates are single-threaded and share the engine. Long CPU hogs would starve other requests in the same PoP. The limit keeps the whole system fair.