HTTP Range: header and 206 Partial Content responses

Comments

3 comments

  • Cassandra Dixon

    Hi Donald,

    The default behavior for Fastly is to strip the range header from the request to origin. Fastly fetches the full object. If there is a partial content request, we also strip the content-range header in vcl_fetch based on the assumption we have the full object in cache and can serve based on content-length.

    However, streaming-miss is an option for large files.

  • Thomas Stephens

    Cassandra,

    Your reply seems to indicate that enabling streaming-miss does cause Fastly to only load the requested byte ranges from the origin service, but it is unclear (and we cannot find any further documentation).

    If we enable streaming-miss, is the client-requested byte range honored when making a request to the origin, or is the entire file loaded from the origin?

  • Andrew Betts

    Hi Thomas.

    Streaming miss is enabled in the fetch stage of the VCL flow, which runs after headers have been received from the origin. By this point we've already sent the request to origin, so it's too late for turning streaming miss on or off to make any difference to the origin request.

    Fastly will by default always load full objects from origin, regardless of whether you choose to stream misses. If the request is for a range, of course only that range will be streamed, while the whole object will go into cache.

Please sign in to leave a comment.