---
header: Network services resource limits
lang: en
last_updated: '2026-01-13'
url: https://docs.fastly.com/products/network-services-resource-limits
---

This guide details Fastly resource limits for [network services](https://docs.fastly.com/products/product-network-services) products and features based on your account type. These limits change based on whether you're using a free account or have purchased one of our [packaged offerings](https://www.fastly.com/package-entitlements/). These limits may be further defined on your service order.

## Cache limits

The cache limits for your account depend on when you became a Fastly customer.

### Account created on or after June 17, 2020

If you created your account on or after June 17, 2020, the following cache limits apply.

Item                                      |  Limit              | Implications
------------------------------------------|---------------------|-------------
Cache file size (with [Segmented Caching](https://www.fastly.com/documentation/guides/full-site-delivery/caching/segmented-caching) enabled)  |  unlimited | None
Cache file size (without [Segmented Caching](https://www.fastly.com/documentation/guides/full-site-delivery/caching/segmented-caching) enabled)  |  20MB               | Exceeding this limit when trying to cache a file results in a [`503 Response object too large`](https://www.fastly.com/documentation/guides/vcl/errors/) error.

### Account created prior to June 17, 2020

If you created your account prior to June 17, 2020, the following cache limits apply.

Item                                      |  Limit              | Implications
------------------------------------------|---------------------|-------------
Cache file size (with [Segmented Caching](https://www.fastly.com/documentation/guides/full-site-delivery/caching/segmented-caching) enabled)  |  unlimited | None
Cache file size (with [streaming miss](https://www.fastly.com/documentation/guides/full-site-delivery/performance/streaming-miss) and without [Segmented Caching](https://www.fastly.com/documentation/guides/full-site-delivery/caching/segmented-caching) enabled)     |  5GB                | Exceeding this limit when trying to cache a file results in a [`503 Response object too large`](https://www.fastly.com/documentation/guides/vcl/errors/) error unless [Segmented Caching](https://www.fastly.com/documentation/guides/full-site-delivery/caching/segmented-caching) is enabled.
Cache file size (without [streaming miss](https://www.fastly.com/documentation/guides/full-site-delivery/performance/streaming-miss) and without [Segmented Caching](https://www.fastly.com/documentation/guides/full-site-delivery/caching/segmented-caching) enabled)  |  2GB                | Exceeding this limit when trying to cache a file results in a [`503 Response object too large`](https://www.fastly.com/documentation/guides/vcl/errors/) error unless [Segmented Caching](https://www.fastly.com/documentation/guides/full-site-delivery/caching/segmented-caching) is enabled.

## Rate and time limits

Item                  | Limit                | Implications
----------------------|----------------------|-------------
API rate limit        | 1000 requests/hour   | Exceeding this limit results in a `Too many requests` error. The limit is applied to the authenticated user making the request. See [API rate limiting](https://www.fastly.com/documentation/reference/api/#rate-limiting) for more info.
TLS connections limit | 10 minutes | Exceeding this limit results in a `502 gateway timeout` error.

## Request and response limits

Item                      | Limit | Implications
--------------------------|-------|-------------
URL size                  | 8KB   | Exceeding the limit results in a `414 URI Too Long` error.
Cookie size               | 32KB  | Exceeding the limit results in Fastly stripping the cookie and setting `req.http.Fastly-Cookie-Overflow = "1"`.
Maximum response size for [tarpitting](https://www.fastly.com/documentation/reference/vcl/functions/miscellaneous/resp-tarpit/) | 4KB | Exceeding the limit results in no error. Tarpitting isn't applied to responses that exceed the limit.
Request header size       | 128KB  | Depending on the circumstances, exceeding the limit can result in Fastly closing the client connection abruptly, or it can result in the client either receiving  a `502 Gateway Error` response with an `I/O error` in the body, or receiving a `503 Service Unavailable` response with a `Header overflow` error in the body.
Response header size      | 128KB  | Exceeding the limit results in a `503 backend read error`. Read our [developer information about errors](https://www.fastly.com/documentation/guides/vcl/errors/) for more info.
Request header count      | 255    | Exceeding the limit results in a `Header overflow` error. A small portion of this limit is reserved for internal Fastly use, making the practical limit closer to 200.
Response header count     | 96    | Exceeding the limit results in a `Header overflow` error. A small portion of this limit is reserved for internal Fastly use, making the practical limit closer to 85.
[`req.body`](https://www.fastly.com/documentation/reference/vcl/variables/client-request/req-body/) size		  | 8KB	  | Exceeding the limit results in the `req.body` variable being blank. Request body payload is available in `req.body` only for payloads smaller than 8KB. `req.postbody` is an alias for `req.body`.
Surrogate key size        | 1KB   | Exceeding the limit results in purging API failures stating "surrogate key too long, must be less than 1024 bytes." Any keys that exceed the limit will be dropped instead of truncated.
Surrogate key header size | 16KB  | Exceeding the limit results in no error and any keys past the one that exceeds the limit will be dropped.
Idle client reuse time | 10 min | Client connections cannot be used after this period of idle and must be reestablished.

## Service, domain, and origin limits

Item                        | Limit | Implications
----------------------------|-------|------------------------------------------------------------
Services total per account  | 10    | Exceeding this limit results in an `Exceeding max_total_services` error. [Contact support](https://support.fastly.com) to discuss raising this limit.
Origins per service         | 5     | Exceeding this limit results in an `Exceeding max_backends` error. [Contact support](https://support.fastly.com) to discuss raising this limit.
[Classic domains](https://www.fastly.com/documentation/guides/getting-started/domains/about-domains/#adding-a-domain-to-fastly) per service         | 20    | Exceeding this limit results in an `Exceeding max number of domains` error. [Contact support](https://support.fastly.com) to discuss raising this limit.
Connections per service     | 200   | Exceeding this limit results in an `Error 503 backend.max_conn reached` error. You can increase this limit as high as 1000 by updating the backend connection setting to limit the connections a single Fastly cache server will make to a specific origin server.

## VCL and configuration limits

Item                              | Limit            | Implications
----------------------------------|------------------|-------------
Custom VCL file size              |  1MB             | Exceeding the limit results in a `Content too long` error.
Maximum VCL file size             |  3MB             | Exceeding the limit results in a `VCL is too long` error.
Varnish restart limit             |  3 restarts      | Exceeding the limit results in a `Service Unavailable` error. This limit exists to prevent infinite loops.
ACL container entries count       |  1000            | Exceeding the limit results in an `Exceeding max ACL entries` error. [Contact support](https://support.fastly.com) to discuss raising this limit.
Dictionary items count       |  1000            | Exceeding the limit results in an `Exceeding max dictionary items` error. [Contact support](https://support.fastly.com) to discuss raising this limit.
Dictionary item key length   |  255 characters  | Exceeding the limit results in an `Item key is too long` error.
Dictionary item value length |  8000 characters | Exceeding the limit results in an `Item value cannot be greater than` error.
Log line size | 16KB Deliver, 64KB Compute |  Exceeding the limit results in truncated logs that could result in delivery errors.
Service chains and hops | 20 hops, 6 unique services | Exceeding the limit results in a `Service unavailable` error with the `Loop detected` response reason text. Read our [developer information about loop detection](https://www.fastly.com/documentation/guides/concepts/service-chaining/#loop-detection) for more info.
Synthetic response characters  | No character limit | Synthetic responses have no character limit, but large responses may trigger an error for the custom VCL file size limit.
Vary objects count                        |  50 soft, 70 hard | Exceeding the soft limit results in no error. Newer variants displace the oldest. Active fetches from backends are limited to 70 variants. Exceeding this hard limit results in a `Too many variants` response. Once fetches complete, objects will be removed until the soft limit is reached. [Image Optimizer](https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/about-fastly-image-optimizer) transformations count towards the variant limit for the original image.

### Varnish workspace limits

A Varnish workspace is an allotted amount of memory that's dedicated to each request process. It's used as temporary storage for objects like headers and local variables, as well as to execute some VCL functions.

Each request process has 256K of workspace per cache node to work with. Subroutines that run on the delivery node (e.g., `recv`, `hash`, `deliver`, `log`, and `error`) have 256K of workspace to use for each individual request process, while the subroutines that run on the fetch node (e.g., `miss`, `hit`, `pass`, and `fetch`) also have 256K of workspace to use.

You can check how much workspace is being used for each request by using the [`workspace.bytes_total`](https://www.fastly.com/documentation/reference/vcl/variables/miscellaneous/workspace-bytes-total/) and [`workspace.bytes_free`](https://www.fastly.com/documentation/reference/vcl/variables/miscellaneous/workspace-bytes-free/) variables in any subroutine.

If a request process exceeds the workspace limit, Varnish will return a `503 Service Unavailable` or `503 Header Overflow` error.
