<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Antoine Brossault</title>
    <description>The latest articles on Forem by Antoine Brossault (@antoinebr).</description>
    <link>https://forem.com/antoinebr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F83822%2F18f2310d-3f85-4bfe-99e7-ef8651763983.jpeg</url>
      <title>Forem: Antoine Brossault</title>
      <link>https://forem.com/antoinebr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/antoinebr"/>
    <language>en</language>
    <item>
      <title>Connecting your CDN to Fastly Object Storage</title>
      <dc:creator>Antoine Brossault</dc:creator>
      <pubDate>Tue, 11 Mar 2025 20:38:30 +0000</pubDate>
      <link>https://forem.com/fastly/connecting-your-cdn-to-fastly-object-storage-46n9</link>
      <guid>https://forem.com/fastly/connecting-your-cdn-to-fastly-object-storage-46n9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;In this article, I'm going to explain how to get started with &lt;a href="https://www.fastly.com/products/storage" rel="noopener noreferrer"&gt;Fastly Object Storage&lt;/a&gt; and connect it to your &lt;a href="https://www.fastly.com/products/cdn" rel="noopener noreferrer"&gt;Fastly CDN&lt;/a&gt; service. In just a few minutes you’ll be up and running with assets stored on Fastly Object Storage and served from your own URL!&lt;/p&gt;

&lt;p&gt;First, what is Fastly Object Storage? It’s an S3 compatible object storage with no egress costs when you connect your Fastly Object Storage as an origin to your CDN service.      &lt;/p&gt;

&lt;p&gt;Fastly Object Storage is always a private bucket, which means you have to provide your CDN service with access and secret keys to connect to it. Therefore, you can’t simply use the object storage URL as the origin. You will need to add a bit of VCL to make it work, but it's not difficult.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To interact with Fastly Object Storage, you will need to create an access key in the Fastly control panel. This key consists of an access key ID and a secret key, which are used to authenticate requests to the S3-compatible API.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to the &lt;a href="http://manage.fastly.com" rel="noopener noreferrer"&gt;&lt;strong&gt;Fastly web interface&lt;/strong&gt;&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Resources&lt;/strong&gt; &amp;gt; &lt;a href="https://accounts.fastly.com/realms/fastly/protocol/openid-connect/auth?client_id=manage-fastly-com&amp;amp;redirect_uri=https%3A%2F%2Fmanage.fastly.com%2Fresources%2Fobject-storage&amp;amp;response_type=code&amp;amp;scope=openid&amp;amp;state=771edf4c688b43598753ee69c1e2e0fb&amp;amp;code_challenge=0yJg5k7Cw0r8cM2iDAmbiySKx87zpKd5ffUauQKpty8&amp;amp;code_challenge_method=S256" rel="noopener noreferrer"&gt;&lt;strong&gt;Object Storage&lt;/strong&gt;&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create Key&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Enter a description and select the scope of access (read or read/write).
&lt;/li&gt;
&lt;li&gt;Be sure to note the access key and secret key, as the secret key will not be visible again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F767v5mdrkxod4qzebjui.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F767v5mdrkxod4qzebjui.png" width="800" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pro tip: For better security, you can restrict your API key to only access a specific bucket.&lt;/p&gt;

&lt;p&gt;Now that you have created your keys, make sure you keep them somewhere safe. We are going to use them to create our first bucket.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create your first bucket and upload files
&lt;/h2&gt;

&lt;p&gt;Currently Fastly does not have a UI for creating a bucket and uploading your first file. However, you can accomplish it by using the AWS S3 CLI or any of the numerous packages and libraries available.&lt;/p&gt;

&lt;p&gt;To make the process as easy as possible for you, &lt;a href="https://github.com/Antoinebr/Fastly-Object-Storage-Demo" rel="noopener noreferrer"&gt;I made a small GUI in Node.js&lt;/a&gt; that allows you to interact with the Fastly Object Storage seamlessly.&lt;/p&gt;

&lt;p&gt;You can install the app with npm or Docker &lt;/p&gt;

&lt;p&gt;Npm :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx fastly-object-storage-easy-ui
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Docker :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d -p 3009:3009 antoinebr/fastly-object-storage-easy-ui:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the app is installed successfully, you can access it by visiting &lt;a href="http://localhost:3009/" rel="noopener noreferrer"&gt;http://localhost:3009/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7chnztb6l1ww0pfeqlze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7chnztb6l1ww0pfeqlze.png" width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, set your credentials in the UI and select the region where you want your files to be stored, along with the access key and secret key. Once that is done you can start creating your first bucket.&lt;/p&gt;

&lt;p&gt;After creating your first bucket, click on “View files” to open the bucket, then proceed to your first upload.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fayr4gc9xcnhdzy44ybjx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fayr4gc9xcnhdzy44ybjx.png" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How to access your files in the buckets ?&lt;/p&gt;

&lt;p&gt;After uploading a file to the bucket, you will not be able to use the bucket URL to access the file directly, such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;❌ https://eu-central.object.fastlystorage.app/&amp;lt;bucket-name&amp;gt;/&amp;lt;file-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You either need to use a proxy app which connects to the S3 bucket via API : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtanxd49g9kju5k8oh4s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtanxd49g9kju5k8oh4s.png" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this case, you can use a proxy app (as shown in the diagram above) and the speed will be limited to ~ 150Mbps and a max 100 req/s per bucket. &lt;/p&gt;

&lt;h2&gt;
  
  
  Use your bucket with your CDN service
&lt;/h2&gt;

&lt;p&gt;The recommended way to use Object Storage is to connect a Fastly CDN service (via VCL) or Compute to your bucket. By doing so, no egress fees will apply, and there are no limitations with respect to speed or requests per second per bucket.&lt;br&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2nrrcmr6cnpu236il1t4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2nrrcmr6cnpu236il1t4.png" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Integrating with Fastly CDN&lt;/strong&gt;
&lt;/h2&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Create a new service&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You may already have an existing service, but for demonstration purposes, I’m going to create a new service: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn4e038w50jikxct3x5a4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn4e038w50jikxct3x5a4.png" width="800" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The important part at this stage is to set the host. In my case, it is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eu-central.object.fastlystorage.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you created your bucket in another region, set it to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;your-region&amp;gt;.object.fastlystorage.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we need to inform our CDN service how to interact with our bucket. To do this, we need to add VCL snippets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq3xivs5794ot8bz6pech.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq3xivs5794ot8bz6pech.png" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;VCL Code for Object Storage Connection&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Below is a VCL code snippet for connecting a Fastly CDN service to an Object Storage bucket. This code handles authentication and request signing for S3-compatible API requests.&lt;/p&gt;

&lt;p&gt;Copy and paste the code in a &lt;code&gt;vcl_miss&lt;/code&gt; (within subroutine).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff08r3vu45h54fx34e12t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff08r3vu45h54fx34e12t.png" width="800" height="564"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/*

object storage connection

View Source 

Priority: 100

Type: miss

*/

declare local var.awsAccessKey STRING;

declare local var.awsSecretKey STRING;

declare local var.awsS3Bucket STRING;

declare local var.awsRegion STRING;

declare local var.awsS3Host STRING;

declare local var.canonicalHeaders STRING;

declare local var.signedHeaders STRING;

declare local var.canonicalRequest STRING;

declare local var.canonicalQuery STRING;

declare local var.stringToSign STRING;

declare local var.dateStamp STRING;

declare local var.signature STRING;

declare local var.scope STRING;

# Change these values to your own data

set var.awsAccessKey = "your_access_key"; # 👈 Update this

set var.awsSecretKey = "your_secret_key"; # 👈 Update this

set var.awsS3Bucket = "your_bucket_name"; # 👈 Update this

set var.awsRegion = "eu-central"; # 👈 Update this with your region of choice

set var.awsS3Host = var.awsRegion ".object.fastlystorage.app";

if (req.method == "GET" &amp;amp;&amp;amp; !req.backend.is_shield) {

 set bereq.http.x-amz-content-sha256 = digest.hash_sha256("");

 set bereq.http.x-amz-date = strftime({"%Y%m%dT%H%M%SZ"}, now);

 set bereq.http.host = var.awsS3Host;

 set bereq.url = querystring.remove(bereq.url);

 set bereq.url = regsuball(urlencode(urldecode(bereq.url.path)), {"%2F"}, "/");

 set var.dateStamp = strftime({"%Y%m%d"}, now);

 set var.canonicalHeaders = ""

   "host:" bereq.http.host LF

   "x-amz-content-sha256:" bereq.http.x-amz-content-sha256 LF

   "x-amz-date:" bereq.http.x-amz-date LF

 ;

 set var.canonicalQuery = "";

 set var.signedHeaders = "host;x-amz-content-sha256;x-amz-date";

 set var.canonicalRequest = ""

   "GET" LF

   bereq.url.path LF

   var.canonicalQuery LF

   var.canonicalHeaders LF

   var.signedHeaders LF

   digest.hash_sha256("")

 ;

 set var.scope = var.dateStamp "/" var.awsRegion "/s3/aws4_request";

 set var.stringToSign = ""

   "AWS4-HMAC-SHA256" LF

   bereq.http.x-amz-date LF

   var.scope LF

   regsub(digest.hash_sha256(var.canonicalRequest),"^0x", "")

 ;

 set var.signature = digest.awsv4_hmac(

   var.awsSecretKey,

   var.dateStamp,

   var.awsRegion,

   "s3",

   var.stringToSign

 );

 set bereq.http.Authorization = "AWS4-HMAC-SHA256 "

   "Credential=" var.awsAccessKey "/" var.scope ", "

   "SignedHeaders=" var.signedHeaders ", "

   "Signature=" + regsub(var.signature,"^0x", "")

 ;

 unset bereq.http.Accept;

 unset bereq.http.Accept-Language;

 unset bereq.http.User-Agent;

 unset bereq.http.Fastly-Client-IP;

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code, update the following lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;set var.awsAccessKey = "your_access_key"; # 👈 Update this

set var.awsSecretKey = "your_secret_key"; # 👈 Update this

set var.awsS3Bucket = "your_bucket_name"; # 👈 Update this

set var.awsRegion = "eu-central"; # 👈 Update this with your region of choice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save your snippet and activate your service. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fknde74xojthtfhmucsk6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fknde74xojthtfhmucsk6.png" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Access your files :&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After activating your service, you should be able to access your files from your CDN service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://&amp;lt;domain-name&amp;gt;/&amp;lt;bucket-name&amp;gt;/&amp;lt;file-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you managed to follow the instructions up to this point, you should have a working connection between your CDN and Fastly Object Storage! Congrats 🎉&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Extra tips :&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To go beyond the basics of connecting your bucket, it's important to optimize delivery and caching performance. Here are a few tips for you:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Enable Segmented Caching for Large Files&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.fastly.com/en/guides/segmented-caching" rel="noopener noreferrer"&gt;Segmented Caching&lt;/a&gt; is essential for serving large files efficiently. It allows Fastly to split resources into smaller chunks, reducing load on the origin server and improving performance for Range requests.&lt;/p&gt;

&lt;p&gt;Example :&lt;/p&gt;

&lt;p&gt;Imagine a video streaming service hosting large videos (e.g., 4 GB movies) on Fastly. A user requests a portion of a video using a Range header to resume playback at 1 GB.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo5tdqwerubhbr4vp5y6f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo5tdqwerubhbr4vp5y6f.png" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To enable Segmented Caching, add the following code to the vcl_recv subroutine:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkv56ydpdx0zay5mtkbgj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkv56ydpdx0zay5mtkbgj.png" width="800" height="100"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Enable Segmented Caching for large files

if (req.url.ext == "mp4") {

 set req.enable_segmented_caching = true;

 # Consider changing the segment size to reduce volume of requests going back to origin

 # The default is 1 MB. This would generate a 100 requests to origin for 100 MB file

 # or 1000 requests for a 1 GB file. The maximum size is 20 MB or 20971520 bytes

 # set segmented_caching.block_size = 20971520;

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Enable Streaming Miss&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.fastly.com/en/guides/streaming-miss" rel="noopener noreferrer"&gt;Streaming Miss&lt;/a&gt; feature ensures that responses are streamed back to the client immediately, reducing first-byte latency.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstmggxgfdc9vln236coa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstmggxgfdc9vln236coa.png" width="800" height="249"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To enable Streaming Miss, add the following code to the vcl_fetch subroutine:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F03cpdjm4n5trl2rwow4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F03cpdjm4n5trl2rwow4f.png" width="800" height="100"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/*
Streaming Miss Feature
View Source 
Priority: 100
Type: fetch
*/

# Streaming Miss does not work with Gzip so you may want to wrap this in a condition
# based on file types that are likely to be Gzipped for example streaming manifests (m3u8 and mpd)
set beresp.do_stream = true;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Join the conversation in our forum
&lt;/h3&gt;

&lt;p&gt;We would like to hear how you are using Fastly Object Storage. Be sure to &lt;a href="https://community.fastly.com/c/object-storage/23" rel="noopener noreferrer"&gt;visit our forum&lt;/a&gt; to let us know how we can support you better and to stay up-to-date on new capabilities released for Fastly Object Storage.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
