Resource limits

This guide details Fastly resource limits and summarizes the implications of exceeding those limits.

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.

ItemLimitImplications
Cache file size (with Segmented Caching enabled)unlimitedNone
Cache file size (without Segmented Caching enabled)20MBExceeding this limit when trying to cache a file results in a 503 Response object too large error.

Account created prior to June 17, 2020

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

ItemLimitImplications
Cache file size (with Segmented Caching enabled)unlimitedNone
Cache file size (with streaming miss and without Segmented Caching enabled)5GBExceeding this limit when trying to cache a file results in a 503 Response object too large error unless Segmented Caching is enabled.
Cache file size (without streaming miss and without Segmented Caching enabled)2GBExceeding this limit when trying to cache a file results in a 503 Response object too large error unless Segmented Caching is enabled.

Rate and time limits

ItemLimitImplications
API rate limit1000 requests/hourExceeding this limit results in a Too many requests error. The limit is applied to the authenticated user making the request. See API rate limiting for more info.
TLS connections limit10 minutesExceeding this limit results in a 502 gateway timeout error.

Request and response limits

ItemLimitImplications
URL size8KBExceeding the limit results in a 414 URI Too Long error.
Cookie size32KBExceeding the limit results in Fastly stripping the cookie and setting req.http.Fastly-Cookie-Overflow = "1".
Maximum response size for tarpitting4KBExceeding the limit results in no error. Tarpitting isn't applied to responses that exceed the limit.
Request header size69KBDepending 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 size69KBExceeding the limit results in a 503 backend read error. See Common 503 errors for more info.
Request header count96Exceeding 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.
Response header count96Exceeding 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 size8KBExceeding 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 size1KBExceeding 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 size16KBExceeding the limit results in no error and any keys past the one that exceeds the limit will be dropped.

Service, domain, and origin limits

ItemLimitImplications
Services total per account10Exceeding this limit results in an Exceeding max_total_services error. Contact support@fastly.com to discuss raising this limit.
Origins per service5Exceeding this limit results in an Exceeding max_backends error. Contact support@fastly.com to discuss raising this limit.
Domains per service20Exceeding this limit results in an Exceeding max number of domains error. Contact support@fastly.com to discuss raising this limit.
Connections per service200Exceeding 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

ItemLimitImplications
Custom VCL file size1MBExceeding the limit results in a Content too long error.
Maximum VCL file size3MBExceeding the limit results in a VCL is too long error.
Varnish restart limit3 restartsExceeding the limit results in a Service Unavailable error. This limit exists to prevent infinite loops.
ACL container entries count1000Exceeding the limit results in an Exceeding max ACL entries error. Contact support@fastly.com to discuss raising this limit.
Dictionary items count1000Exceeding the limit results in an Exceeding max dictionary items error. Contact support@fastly.com to discuss raising this limit.
Dictionary item key length256 charactersExceeding the limit results in an Item key is too long error.
Dictionary item value length8000 charactersExceeding the limit results in an Item value cannot be greater than error.
Log line size16KB Deliver, 64KB ComputeExceeding the limit results in truncated logs that could result in delivery errors.
Synthetic response charactersNo character limitSynthetic responses have no character limit, but large responses may trigger an error for the custom VCL file size limit.
Vary objects count50 soft, 70 hardExceeding 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.

Compute@Edge limits

Limits for Compute@Edge services are described in our developer learning resources. These limits are lower for free trial accounts.

Was this guide helpful?

Do not use this form to send sensitive information. If you need assistance, contact support@fastly.com.