Product limits

Keep these limitations in mind when designing your EdgeWorkers functions. These limitations apply to all EdgeWorkers functions regardless of the selected resource tier.

You can also refer to the limitations that are applied based on the resource tier you selected for your EdgeWorker ID.

DescriptionLimit
Supported delivery productsIon
Dynamic Site Accelerator (DSA)
Adaptive Media Delivery
Download Delivery
Object Delivery
API Acceleration
Supported delivery methodEnhanced TLS - When you've applied a custom certificate to a property configuration, the associated Edge hostname uses the .edgekey.net domain.

Standard TLS, used to serve non PCI compliant traffic over HTTP or HTTPS via an edgesuite.net and akamaized.net edge hostname, is also supported.

EdgeWorkers is not supported on ​Akamai​ CDNs created to accommodate unique regional or governmental requirements. This limitation currently includes China CDN.
Execution restrictions on the Enhanced TLS networkTo execute an EdgeWorkers function using an ESI (Edge Side Includes) fragment request you need to add a user-defined variable to your EdgeWorkers rule.

Add PMUSER_ENABLE_EW_ESI_FRAG and set it to true.
The name of the variable must be UPPERCASE.

Note: The user-defined variable is not required if you are using the Standard TLS delivery method.
Number of EdgeWorker scripts executed per request1
Maximum number of EdgeWorker IDs per account200
Maximum number of versions per EdgeWorker ID1000
Maximum number of activations each minute on a network per account20
Maximum number of activations each day per account500
Compressed size for a code bundle512 KB
Uncompressed size for a code bundle1 MB
Maximum response header size for HTTP sub-requests8192 bytes
Maximum body size for responses created using the respondWith() method2048 characters
Maximum body size for responses from origin to an EdgeWorkers function, using httpRequest()128 KB when using json() or text() to buffer the entire response.

5 MB when using body to read the response as a stream.
Maximum body size for responses from an EdgeWorkers function to a browser when the response is passed through as a string100,000 bytes if you pass a string to createResponse in responseProvider

No direct limit if you pass a stream to createResponse in responseProvider.
Maximum body size for responses from an EdgeWorkers function to a client browser2048 characters if you use request.respondWith() in the onClientRequest or onClientResponse event handler.
Maximum body size when request.text() or request.json() is called in the responseProvider event handler16 KB
Maximum streaming request body size when request.body is called in the responseProvider event handler1 MB
Maximum size of the response status and header for responses generated using createResponse8 KB

subWorkers limits

These limits apply to subWorkers in addition to the limits documented above.

DescriptionExampleLimit
Maximum tree depth for
onClientRequest
onOriginRequest
onOriginResponse
onClientResponse
The maximum number of nested subWorkers allowed for a single root sub-request.

For example, an EdgeWorker issues a subWorker that triggers:
->subWorker EW1 that has a subWorker that triggers
-->subWorker EW2 → maximum depth reached
2
Maximum number of subWorker event-handlers in a tree for
onClientRequest
onOriginRequest
onOriginResponse
onClientResponse
The maximum number of subWorker event-handlers** **allowed for a single root EdgeWorker.

For example, an EdgeWorker issues SR1 that triggers:
->subWorker EW1 with only one event handler implemented that issues SR2, SR3, and SR4, SR5 each triggering
-->subWorkers EW2, EW3, EW4, EW5, each with also one event handler

An EdgeWorker issues a SR1 that triggers
->subWorker EW1 that implements four event handlers, one of the event handler issues a SR2 that triggers
-->subWorkers EW2 that implements one event handler
5
Maximum tree depth for responseProviderThe maximum number of nested subWorkers allowed for a single root sub-request.

For example, an EdgeWorker issues a subWorker that triggers:
->subWorker EW1 that has a subWorker that triggers
-->subWorker EW2 → maximum depth reached
2
Maximum number of subWorker event handlers in a tree for responseProviderThe maximum number of subWorker event-handlers** **allowed for a single root EdgeWorker.

For example, an EdgeWorker issues SR1 that triggers:
->subWorker EW1 with only one event handler implemented that issues SR2, SR3, and SR4, SR5 each triggering
-->subWorkers EW2, EW3, EW4, EW5, each with also one event handler

An EdgeWorker issues a SR1 that triggers
->subWorker EW1 that implements four event handlers, one of the event handler issues a SR2 that triggers
-->subWorkers EW2 that implements one event handler
5

📘

Implicit wall time limit of the parent EdgeWorker

If the parent EdgeWorker uses too much wall time waiting for the subWorker to respond, the request will time out. This terminates the request from the original browser.

Flexible composition limits

These limits apply to EdgeWorkers functions created using flexible composition.

📘

The existing Product and Resource tier limits also apply to the parent EdgeWorker and to all of the parent's child EdgeWorkers. The limits do not apply individually to each EdgeWorker in a combined code bundle.

DescriptionExampleLimit
Maximum dependency tree height from the top-level parent of an active revisionThe supported depth of the dependency tree. The number of levels of child EdgeWorkers that a top-level parent can import.
For example, parent EdgeWorker version 1, imports:
-> EdgeWorker 2 version 1 imports
-- > EdgeWorker 3 version 1 imports
---> EdgeWorker 4 version 2 imports → maximum height reached
3
Maximum direct dependencies that can be imported by a parent revisionThe number of child EdgeWorkers that a top-level parent can directly import.
For example, parent EdgeWorker version 1, revision 3 imports as direct children:

- EdgeWorker 1
- EdgeWorker 2
- EdgeWorker 3
- EdgeWorker 4
- EdgeWorker 5 → maximum imports reached
5
Number of times an active version can be imported by an active revisionThe number of parent EdgeWorkers an active child EdgeWorker version can belong to.
For example, EdgeWorker 1, version 1 is imported by:

- EdgeWorker 2 version 1, revision 1
- EdgeWorker 3 version 1, revision 1
- EdgeWorker 4 version 1, revision 2 → maximum number of parents reached
3
Maximum dependencies per revisionThe number of dependencies a parent EdgeWorkers function supports, including children and descendants of children.30
Compressed size for a combined code bundle1 MB
Uncompressed size for a combined code bundle5 MB

📘

Refer to the Terminology section in this guide to learn more about the concepts and terms used for flexible composition.

Limits for JavaScript logs delivered via DataStream 2

These limits apply when you use DataStream 2 to deliver JavaScript logs.

DescriptionLimit
Maximum number of logging level change each minute on a network per account20
Maximum number of logging messages delivered via DataStream 2 each second on a network per EdgeWorker ID250 messages per second, per EdgeWorker ID
Maximum size of a logging message1 KB
Log entry timestampTime of execution start