Platform primitives /Edge Functions /

Edge Functions limits

Keep the following limitations in mind when working with Edge Functions.

# Operation limits

Edge functions have limits for their size and the amount of memory and execution time they can use:

  • Code size limit: 20 MB after compression

    This is the maximum edge function bundle size supported.

  • Memory per set of deployed edge functions: 512 MB

  • CPU execution time per request: 50 ms

    This tracks all time spent running your scripts. Execution time does not include time spent waiting for resources or responses.

  • Response header timeout: 40 s

# Invocation limits

The number of invocations allowed per month varies by team plan. Refer to the pricing page for details.

Cached responses from edge functions configured for caching do not count toward edge function invocations.

# Feature limitations

  • If a site has Netlify’s Split Testing enabled, requests to that site will not execute edge functions.
  • If a site is using Netlify’s Custom Headers, including basic authentication headers, they will not apply to edge functions.
  • If a site has prerendering enabled, it will not apply to paths where the response is served from an edge function.
  • Unexpected collisions may occur if a site has multiple framework plugins generating edge functions as part of the build.
  • Edge functions can only rewrite requests to same-site URLs. To fetch content hosted on another Netlify site or an external site, use the fetch Web API.
  • Edge functions configured for caching always shadow static files that actually exist within the site. If an edge function configured for caching is declared to run on /* and there’s a cat.png static file, a request to /cat.png serves the edge function rather than the static file.
  • Edge functions configured for caching use the request’s URL path to determine whether to create a new cache object or reuse an existing one. This approach can’t be customized. Edge functions can not be cached based on URL query parameters or client location.
  • There is no local caching for edge functions. Any HTTP headers for cache configuration in an edge function are ignored in local testing.

Learn more about the edge function processing order and caveats

Along with the above limitations, we recommend you review our docs on the declaration processing order and caveats to consider when you create edge functions.