We've been making changes to how we organize and display our docs. Our work isn't done but we'd love your feedback.
Getting started
Basics
Domains & Origins
Performance

Configuration
Basics
Conditions
Dictionaries
Domains & Origins
Request settings
Cache settings
Headers
Responses
Performance
Custom VCL
Image optimization
Video

Security
Access Control Lists
Monitoring and testing
Securing communications
TLS
Web Application Firewall

Integrations
Logging endpoints
Non-Fastly services

Diagnostics
Streaming logs
Debugging techniques
Common errors

Account info
Account management
Billing
User access and control

Reference

    Streaming Miss

      Last updated July 15, 2019

    By default, Fastly limits cached file sizes to 2GB. Our Streaming Miss feature allows you to increase that limit for large files up to 5GB in size. Streaming Miss can be performed on any kind of large file, not just streamed video files.

    How Streaming Miss works

    When fetching an object from the origin, the Streaming Miss feature ensures the response is streamed back to the client immediately and is written to cache only after the whole object has been fetched. This reduces the first-byte latency (the time that the client must wait before it starts receiving the response body).

    When Streaming Miss is enabled, the maximum cache file size is slightly below 5GB (specifically 5,368,578,048 bytes). Without it, the maximum cache file size is slightly below 2GB (specifically 2,147,352,576 bytes).

    Enable Streaming Miss using a VCL Snippet

    Using a VCL Snippet, you can enable Streaming Miss by setting beresp.do_stream to true in vcl_fetch:

    1. Log in to the Fastly web interface and click the Configure link.
    2. From the service menu, select the appropriate service.
    3. Click the Configuration button and then select Clone active. The Domains page appears.
    4. Click the VCL Snippets link. The VCL Snippets page appears.
    5. Click the Create your first VCL snippet. The Create a VCL snippet page appears.

      Enable Streaming Miss via a VCL Snippet

    6. In the Name field type an appropriate name (e.g., Enabling Streaming Miss).
    7. From the Type (placement of the snippets) controls, select within subroutine.
    8. From the Select subroutine menu, select fetch (vcl_fetch).
    9. In the VCL field, add set beresp.do_stream = true;.
    10. Click Create to create the snippet.
    11. Click the Activate button to deploy your configuration changes.

    Enable Streaming Miss using a header

    You also can enable Streaming Miss by creating a new header via the web interface (this also can be controlled with conditions).

    1. Log in to the Fastly web interface and click the Configure link.
    2. From the service menu, select the appropriate service.
    3. Click the Configuration button and then select Clone active. The Domains page appears.
    4. Click the Content link. The Content page appears.
    5. Click the Create header button. The Create a header window appears.

      Enable Streaming Miss

    6. Fill out the Create a header fields as follows:
      • In the Name field, type the name of your header rule (for example, Enabling Streaming Miss).
      • From the Type menu, select Cache, and from the Action menu, select Set.
      • In the Destination field, type do_stream.
      • In the Source field, type true.
      • From the Ignore if set menu, select No if you want the header in the Destination field modified or select Yes if you don't want it modified.
      • In the Priority field, type the order the header rules execute.
    7. Click the Create button.
    8. Click the Activate button to deploy your configuration changes.

    Streaming Miss limitations

    There are several limitations to using Streaming Miss.

    Origins cannot use TLS and object size will be limited

    Fastly's Streaming Miss functionality currently only supports HTTPS (TLS) origin servers on a limited availability basis. Contact your Technical Account Manager or support@fastly.com to see if you qualify for early access to this program.

    Until you've been accepted into the LA program, Streaming Miss will not support HTTPS (TLS) origin servers. The content requested will be served to the client over HTTPS, but it won't be fetched with Streaming Miss over HTTPS. Objects fetched from HTTPS origins will therefore be limited to the non-Streaming Miss size of 2GB.

    Streaming Miss is not available to HTTP/1.0 clients

    If an HTTP/1.0 request triggers a fetch and the response header from the origin does not contain a Content-Length field, then Streaming Miss will be disabled for the fetch and the fetched object will be subject to the non-streaming-miss object size limit of 2GB. Without the client receiving the Content-Length, the client cannot distinguish the proper end of the download from an abrupt connection breakage anywhere upstream from it.

    If an HTTP/1.0 request is received while a Streaming Miss for an object is in progress, the HTTP/1.0 request will wait for the response body to be downloaded before it will receive the response header and the response body, as if the object was being fetched without Streaming Miss.

    Cache hits are not affected. An HTTP/1.0 client can receive a large object served from cache, just like an HTTP/1.1 client.

    Streaming Miss is not compatible with on-the-fly gzip compression of fetched objects

    Streaming Miss can handle large files whether or not they are compressed. On-the-fly compression of objects not already compressed is not compatible with Streaming Miss. Specifically, if VCL sets beresp.gzip to true, Streaming Miss will be disabled.

    Streaming Miss is not compatible with ESI (Edge-Side Includes)

    Responses processed through ESI, which dynamically inserts content into cached pages, cannot be streamed. Responses included from an ESI template also cannot be streamed. When ESI is enabled for a response or when a response is fetched using <esi:include>, then Streaming Miss will be disabled and the fetched object will be subject to the non-streaming-miss object size limit of 2GB.

    Back to Top