RealComposer
Performance & Edge

Worker CPU Time Limits

Direct Definition

Worker CPU time limits are per-invocation caps on how much processor time an edge runtime may spend executing your code, distinct from wall-clock timeouts. Exceeding the limit terminates the request, so large JSON parsing, cryptography, and tight loops in edge workers can fail even when network waits are short.

Technical Architecture & Deep-Dive

Edge platforms meter CPU to keep multitenant fleets fair. Waiting on fetch does not always count the same as parsing a megabyte JSON tree or compressing bodies synchronously. Aggregation pipelines that map thousands of records per request can hit CPU limits before subrequest limits.

Design workers to stream or chunk work, cache parsed intermediates, push heavy transforms to batch jobs, and slim payloads early so edge code touches fewer bytes. Measure both wall time and CPU time when profiling slow gateway routes.

Key Architectural Benefits

Explains sudden 1105-style failures on large payloads at the edge.
Encourages slimming and bounded transforms in gateway code.
Keeps shared edge fleets predictable under load spikes.
REALCOMPOSER EDGE WORKSPACE

Implement Worker CPU Time Limits at the Edge

Deploy lightweight API aggregation, edge caching, and secret injection in minutes without Docker containers or complex servers.

START BUILDING FREE

Frequently Asked Questions

Q:Does waiting on fetch count against CPU limits?

Platforms differ, but CPU limits target execution time in your isolate. Long upstream waits usually hit wall-clock timeouts first, while parsing and transformation consume CPU budget.

Related Architecture Concepts

Ready-to-Use Edge Recipes