Limitations

Keep these limitations in mind when designing your EdgeWorker functions.

Limitations

These limitations apply to all EdgeWorker functions regardless of the selected resource tier.
Description Limit
Supported delivery products Ion

Dynamic Site Accelerator (DSA)

Adaptive Media Delivery

Download Delivery

Object Delivery

API Acceleration
Supported delivery network Enhanced TLS
Note: When you've applied a custom certificate to a property configuration, the associated Edge hostname uses the .edgekey.net domain.
Note: Standard TLS, used to serve non PCI compliant traffic over HTTP or HTTPS via an edgesuite.net edge hostname, is not supported.
Note: EdgeWorkers is not supported on Akamai CDNs created to accommodate unique regional or governmental requirements. This limitation currently includes China CDN.
Number of activated EdgeWorker scripts per account 5000 per network
Number of EdgeWorker scripts executed per request 1
Compressed size for a code bundle 512 KB
Uncompressed size for a code bundle 1 MB
Edge constructed HTTP response body size
Tip: Edge constructed response bodies are created without making a request to an origin server to fetch content.
2048 characters
Note: This limitation only applies to the respondWith() method.
Maximum size of a response body when using the json() and text() methods from the HttpResponse Object

2048 characters for edge constructed response bodies

128 KB for buffered response bodies

Unbounded for streamed response bodies

JavaScript initialization timeout
Note: The JavaScript initialization time does not include the time it takes to fetch and decompress the EdgeWorkers code bundle.
100 milliseconds
JavaScript CPU initialization timeout 30 milliseconds

Resource tier limitations

These limitations are unique for each resource tier. There are currently two resource tiers available, Dynamic Compute and Basic Compute. Go to the resource tiers section for more informaton including details about which use cases are supported for each resource tier.

Tip: The limits for EdgeWorker IDs created before resource tiers were available will not change. By default, these EdgeWorker functions will execute using Dynamic Compute. The Dynamic Compute limits are the same as the limits applied prior to the introduction of resource tiers.
Event handler Description Basic Compute Dynamic Compute
all event handlers Maximum CPU time during initialization 30 milliseconds 30 milliseconds
Maximum wall time during initialization 100 milliseconds 100 milliseconds
onClientRequest

onOriginRequest

onOriginResponse

onClientResponse
Maximum memory usage per event handler 1.5 MB 1.5 MB
Maximum CPU time per event handler 4 milliseconds 10 milliseconds
Maximum wall time per event handler 100 milliseconds 4 seconds
Maximum number of HTTP sub-requests allowed from a parent request 0 1

See note below.
Maximum number of HTTP sub-requests allowed in parallel per request 0 1
Maximum wall time per HTTP sub-request 0 1 second
Maximum response size per HTTP sub-request 0 1 MB
responseProvider Maximum memory usage for responseProvider 2 MB 2 MB
Maximum CPU time for responseProvider 4 milliseconds 100 milliseconds
Maximum wall time for responseProvider 100 milliseconds 4 seconds
Maximum number of HTTP sub-requests allowed for responseProvider 0 50
Maximum number of HTTP sub-requests allowed in parallel for responseProvider 0 5
Maximum wall time for HTTP sub-requests during the execution of the responseProvider event handler 1 second 1 second
Maximum response size for HTTP sub-requests during the execution of the responseProvider event handler 1 MB 1 MB
Note: This limit does not apply to streamed responses.
Note: You can use content fetched using the onClientRequest event handler to modify the original end-user request's cache key. For cache keys modified in this way, you need to use purge by CP Code and not by URL. For instructions on how to purge a CP code see Purge Content by CP code. For instructions on how to create a CP code see Create a CP code.

Event handler methods

View the supported methods for each of the EdgeWorkers event handlers.
Event handler Supported methods Unsupported methods

onClientRequest

onOriginRequest

onOriginResponse

onClientResponse

GET

HEAD

POST

PUT

DELETE

Note: HTTP requests made during the onClientRequest event only support the GET and HEAD methods.

CONNECT

OPTIONS

TRACE

PATCH

responseProvider

GET

HEAD

CONNECT

OPTIONS

TRACE

PATCH

POST

PUT

DELETE