Does CloudCDN support the serving of Brotli encoding?What is base 64 encoding used for?Encode URL in JavaScript?Twitter image encoding challengeExcel to CSV with UTF8 encodingHow to do Base64 encoding in node.js?Java URL encoding of query string parametersWhy IE 10 & 11 can't load GZiped content (js and css)?CSS/JS files are not getting GZIPed [Amazon CloudFront] - “Compress Objects Automatically” enabledgZIP with AWS cloudFront and S3Missing content-encoding in Response Header for Request headers with accept-encoding: gzip, deflate, br (in that precise order) for HTTPS Requests

Is it possible to map the firing of neurons in the human brain so as to stimulate artificial memories in someone else?

What is an equivalently powerful replacement spell for the Yuan-Ti's Suggestion spell?

Knowledge-based authentication using Domain-driven Design in C#

How to install cross-compiler on Ubuntu 18.04?

What is the fastest integer factorization to break RSA?

How many wives did king shaul have

How seriously should I take size and weight limits of hand luggage?

Does the Idaho Potato Commission associate potato skins with healthy eating?

Finding the error in an argument

Theorists sure want true answers to this!

Is there a hemisphere-neutral way of specifying a season?

Finitely generated matrix groups whose eigenvalues are all algebraic

What do you call someone who asks many questions?

Send out email when Apex Queueable fails and test it

how do we prove that a sum of two periods is still a period?

Mathematica command that allows it to read my intentions

Notepad++ delete until colon for every line with replace all

What is a Samsaran Word™?

Placement of More Information/Help Icon button for Radio Buttons

Can compressed videos be decoded back to their uncompresed original format?

What does the same-ish mean?

Avoiding the "not like other girls" trope?

Implication of namely

Unlock My Phone! February 2018



Does CloudCDN support the serving of Brotli encoding?


What is base 64 encoding used for?Encode URL in JavaScript?Twitter image encoding challengeExcel to CSV with UTF8 encodingHow to do Base64 encoding in node.js?Java URL encoding of query string parametersWhy IE 10 & 11 can't load GZiped content (js and css)?CSS/JS files are not getting GZIPed [Amazon CloudFront] - “Compress Objects Automatically” enabledgZIP with AWS cloudFront and S3Missing content-encoding in Response Header for Request headers with accept-encoding: gzip, deflate, br (in that precise order) for HTTPS Requests













0















My company is thinking of moving from AWS to GCP. One of the feature we want to support from CloudCDN is brotli encoding. We have a techstack that will bundle our javascript into 3 files:



chunk.js
chunk.js.gz
chunk.js.br


If CloudCDN receives client request headers Accept-Encoding: br, gzip is CloudCDN smart enough to serve up Brotli file? Moreover, will it be cached? If not, are there any other approaches in achieving this in CloudCDN.



AWS Cloudfront only offers this feature with the use of 2 lamdbas. Which I think is a bad idea.










share|improve this question


























    0















    My company is thinking of moving from AWS to GCP. One of the feature we want to support from CloudCDN is brotli encoding. We have a techstack that will bundle our javascript into 3 files:



    chunk.js
    chunk.js.gz
    chunk.js.br


    If CloudCDN receives client request headers Accept-Encoding: br, gzip is CloudCDN smart enough to serve up Brotli file? Moreover, will it be cached? If not, are there any other approaches in achieving this in CloudCDN.



    AWS Cloudfront only offers this feature with the use of 2 lamdbas. Which I think is a bad idea.










    share|improve this question
























      0












      0








      0








      My company is thinking of moving from AWS to GCP. One of the feature we want to support from CloudCDN is brotli encoding. We have a techstack that will bundle our javascript into 3 files:



      chunk.js
      chunk.js.gz
      chunk.js.br


      If CloudCDN receives client request headers Accept-Encoding: br, gzip is CloudCDN smart enough to serve up Brotli file? Moreover, will it be cached? If not, are there any other approaches in achieving this in CloudCDN.



      AWS Cloudfront only offers this feature with the use of 2 lamdbas. Which I think is a bad idea.










      share|improve this question














      My company is thinking of moving from AWS to GCP. One of the feature we want to support from CloudCDN is brotli encoding. We have a techstack that will bundle our javascript into 3 files:



      chunk.js
      chunk.js.gz
      chunk.js.br


      If CloudCDN receives client request headers Accept-Encoding: br, gzip is CloudCDN smart enough to serve up Brotli file? Moreover, will it be cached? If not, are there any other approaches in achieving this in CloudCDN.



      AWS Cloudfront only offers this feature with the use of 2 lamdbas. Which I think is a bad idea.







      encoding compression brotli google-cloud-cdn






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 21:07









      Matthew HarwoodMatthew Harwood

      6,1461983164




      6,1461983164






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Yes, Cloud CDN can cache all 3 representations and serve the correct one based on the client's Accept-Encoding header so long as the response from your origin server includes a Vary: Accept-Encoding header. There's more information at https://cloud.google.com/cdn/docs/caching#vary_headers.



          Update:



          I didn't realize you were using a Cloud Storage bucket as the origin. Unfortunately, neither Cloud CDN nor Cloud Storage have functionality that will rewrite client requests for /chunk.js to /chunk.js.br based on whether the client supports Brotli. I agree that would useful, so I filed an internal feature request.



          When an origin server such as nginx is configured to select the appropriate file, Cloud CDN needs to go back to the origin server only on a cache miss. So long as the origin server's responses contain a Vary: Accept-Encoding header, Cloud CDN can serve cache hits directly from the edge by comparing the client's Accept-Encoding request header with the Accept-Encoding value specified when the response was cached. Clients that specify Accept-Encoding: br, gzip will be served from one cache entry while clients that specify Accept-Encoding: gzip will be served from another.






          share|improve this answer

























          • Just to be clear, I want the client to request chunk.js and receive chunk.js.br. Is the filename switch purely based off of convention? How does CloudCDN know to rewrite the filename/serve chunk.js.br from the requested chunk.js.

            – Matthew Harwood
            Mar 10 at 15:00












          • Sorry, I misunderstood your question. Cloud CDN will not rewrite the filename in the client request. The way this is normally done is the origin server chooses which file to serve (e.g. via nginx config) based on the Accept-Encoding request header and includes a Vary: Accept-Encoding response header to let the CDN know.

            – elving
            Mar 11 at 22:20











          • Thanks so much for helping @elving. Shouldn't the CloudCDN just kind of point to a Google Cloud Storage bucket and the client should be served a file from the edge? By making a round trip to origin/nginx, it would seem to defeat the purpose of using CloudCDN(edge). Does CloudCDN distribute the web server/origin/nginx on the edge? If this is the case that sounds great, if not I'm still not fully understanding how this can all work. Sorry if I'm mangling verbiage

            – Matthew Harwood
            Mar 11 at 23:40












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071013%2fdoes-cloudcdn-support-the-serving-of-brotli-encoding%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Yes, Cloud CDN can cache all 3 representations and serve the correct one based on the client's Accept-Encoding header so long as the response from your origin server includes a Vary: Accept-Encoding header. There's more information at https://cloud.google.com/cdn/docs/caching#vary_headers.



          Update:



          I didn't realize you were using a Cloud Storage bucket as the origin. Unfortunately, neither Cloud CDN nor Cloud Storage have functionality that will rewrite client requests for /chunk.js to /chunk.js.br based on whether the client supports Brotli. I agree that would useful, so I filed an internal feature request.



          When an origin server such as nginx is configured to select the appropriate file, Cloud CDN needs to go back to the origin server only on a cache miss. So long as the origin server's responses contain a Vary: Accept-Encoding header, Cloud CDN can serve cache hits directly from the edge by comparing the client's Accept-Encoding request header with the Accept-Encoding value specified when the response was cached. Clients that specify Accept-Encoding: br, gzip will be served from one cache entry while clients that specify Accept-Encoding: gzip will be served from another.






          share|improve this answer

























          • Just to be clear, I want the client to request chunk.js and receive chunk.js.br. Is the filename switch purely based off of convention? How does CloudCDN know to rewrite the filename/serve chunk.js.br from the requested chunk.js.

            – Matthew Harwood
            Mar 10 at 15:00












          • Sorry, I misunderstood your question. Cloud CDN will not rewrite the filename in the client request. The way this is normally done is the origin server chooses which file to serve (e.g. via nginx config) based on the Accept-Encoding request header and includes a Vary: Accept-Encoding response header to let the CDN know.

            – elving
            Mar 11 at 22:20











          • Thanks so much for helping @elving. Shouldn't the CloudCDN just kind of point to a Google Cloud Storage bucket and the client should be served a file from the edge? By making a round trip to origin/nginx, it would seem to defeat the purpose of using CloudCDN(edge). Does CloudCDN distribute the web server/origin/nginx on the edge? If this is the case that sounds great, if not I'm still not fully understanding how this can all work. Sorry if I'm mangling verbiage

            – Matthew Harwood
            Mar 11 at 23:40
















          1














          Yes, Cloud CDN can cache all 3 representations and serve the correct one based on the client's Accept-Encoding header so long as the response from your origin server includes a Vary: Accept-Encoding header. There's more information at https://cloud.google.com/cdn/docs/caching#vary_headers.



          Update:



          I didn't realize you were using a Cloud Storage bucket as the origin. Unfortunately, neither Cloud CDN nor Cloud Storage have functionality that will rewrite client requests for /chunk.js to /chunk.js.br based on whether the client supports Brotli. I agree that would useful, so I filed an internal feature request.



          When an origin server such as nginx is configured to select the appropriate file, Cloud CDN needs to go back to the origin server only on a cache miss. So long as the origin server's responses contain a Vary: Accept-Encoding header, Cloud CDN can serve cache hits directly from the edge by comparing the client's Accept-Encoding request header with the Accept-Encoding value specified when the response was cached. Clients that specify Accept-Encoding: br, gzip will be served from one cache entry while clients that specify Accept-Encoding: gzip will be served from another.






          share|improve this answer

























          • Just to be clear, I want the client to request chunk.js and receive chunk.js.br. Is the filename switch purely based off of convention? How does CloudCDN know to rewrite the filename/serve chunk.js.br from the requested chunk.js.

            – Matthew Harwood
            Mar 10 at 15:00












          • Sorry, I misunderstood your question. Cloud CDN will not rewrite the filename in the client request. The way this is normally done is the origin server chooses which file to serve (e.g. via nginx config) based on the Accept-Encoding request header and includes a Vary: Accept-Encoding response header to let the CDN know.

            – elving
            Mar 11 at 22:20











          • Thanks so much for helping @elving. Shouldn't the CloudCDN just kind of point to a Google Cloud Storage bucket and the client should be served a file from the edge? By making a round trip to origin/nginx, it would seem to defeat the purpose of using CloudCDN(edge). Does CloudCDN distribute the web server/origin/nginx on the edge? If this is the case that sounds great, if not I'm still not fully understanding how this can all work. Sorry if I'm mangling verbiage

            – Matthew Harwood
            Mar 11 at 23:40














          1












          1








          1







          Yes, Cloud CDN can cache all 3 representations and serve the correct one based on the client's Accept-Encoding header so long as the response from your origin server includes a Vary: Accept-Encoding header. There's more information at https://cloud.google.com/cdn/docs/caching#vary_headers.



          Update:



          I didn't realize you were using a Cloud Storage bucket as the origin. Unfortunately, neither Cloud CDN nor Cloud Storage have functionality that will rewrite client requests for /chunk.js to /chunk.js.br based on whether the client supports Brotli. I agree that would useful, so I filed an internal feature request.



          When an origin server such as nginx is configured to select the appropriate file, Cloud CDN needs to go back to the origin server only on a cache miss. So long as the origin server's responses contain a Vary: Accept-Encoding header, Cloud CDN can serve cache hits directly from the edge by comparing the client's Accept-Encoding request header with the Accept-Encoding value specified when the response was cached. Clients that specify Accept-Encoding: br, gzip will be served from one cache entry while clients that specify Accept-Encoding: gzip will be served from another.






          share|improve this answer















          Yes, Cloud CDN can cache all 3 representations and serve the correct one based on the client's Accept-Encoding header so long as the response from your origin server includes a Vary: Accept-Encoding header. There's more information at https://cloud.google.com/cdn/docs/caching#vary_headers.



          Update:



          I didn't realize you were using a Cloud Storage bucket as the origin. Unfortunately, neither Cloud CDN nor Cloud Storage have functionality that will rewrite client requests for /chunk.js to /chunk.js.br based on whether the client supports Brotli. I agree that would useful, so I filed an internal feature request.



          When an origin server such as nginx is configured to select the appropriate file, Cloud CDN needs to go back to the origin server only on a cache miss. So long as the origin server's responses contain a Vary: Accept-Encoding header, Cloud CDN can serve cache hits directly from the edge by comparing the client's Accept-Encoding request header with the Accept-Encoding value specified when the response was cached. Clients that specify Accept-Encoding: br, gzip will be served from one cache entry while clients that specify Accept-Encoding: gzip will be served from another.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 13 at 3:15

























          answered Mar 9 at 20:39









          elvingelving

          89134




          89134












          • Just to be clear, I want the client to request chunk.js and receive chunk.js.br. Is the filename switch purely based off of convention? How does CloudCDN know to rewrite the filename/serve chunk.js.br from the requested chunk.js.

            – Matthew Harwood
            Mar 10 at 15:00












          • Sorry, I misunderstood your question. Cloud CDN will not rewrite the filename in the client request. The way this is normally done is the origin server chooses which file to serve (e.g. via nginx config) based on the Accept-Encoding request header and includes a Vary: Accept-Encoding response header to let the CDN know.

            – elving
            Mar 11 at 22:20











          • Thanks so much for helping @elving. Shouldn't the CloudCDN just kind of point to a Google Cloud Storage bucket and the client should be served a file from the edge? By making a round trip to origin/nginx, it would seem to defeat the purpose of using CloudCDN(edge). Does CloudCDN distribute the web server/origin/nginx on the edge? If this is the case that sounds great, if not I'm still not fully understanding how this can all work. Sorry if I'm mangling verbiage

            – Matthew Harwood
            Mar 11 at 23:40


















          • Just to be clear, I want the client to request chunk.js and receive chunk.js.br. Is the filename switch purely based off of convention? How does CloudCDN know to rewrite the filename/serve chunk.js.br from the requested chunk.js.

            – Matthew Harwood
            Mar 10 at 15:00












          • Sorry, I misunderstood your question. Cloud CDN will not rewrite the filename in the client request. The way this is normally done is the origin server chooses which file to serve (e.g. via nginx config) based on the Accept-Encoding request header and includes a Vary: Accept-Encoding response header to let the CDN know.

            – elving
            Mar 11 at 22:20











          • Thanks so much for helping @elving. Shouldn't the CloudCDN just kind of point to a Google Cloud Storage bucket and the client should be served a file from the edge? By making a round trip to origin/nginx, it would seem to defeat the purpose of using CloudCDN(edge). Does CloudCDN distribute the web server/origin/nginx on the edge? If this is the case that sounds great, if not I'm still not fully understanding how this can all work. Sorry if I'm mangling verbiage

            – Matthew Harwood
            Mar 11 at 23:40

















          Just to be clear, I want the client to request chunk.js and receive chunk.js.br. Is the filename switch purely based off of convention? How does CloudCDN know to rewrite the filename/serve chunk.js.br from the requested chunk.js.

          – Matthew Harwood
          Mar 10 at 15:00






          Just to be clear, I want the client to request chunk.js and receive chunk.js.br. Is the filename switch purely based off of convention? How does CloudCDN know to rewrite the filename/serve chunk.js.br from the requested chunk.js.

          – Matthew Harwood
          Mar 10 at 15:00














          Sorry, I misunderstood your question. Cloud CDN will not rewrite the filename in the client request. The way this is normally done is the origin server chooses which file to serve (e.g. via nginx config) based on the Accept-Encoding request header and includes a Vary: Accept-Encoding response header to let the CDN know.

          – elving
          Mar 11 at 22:20





          Sorry, I misunderstood your question. Cloud CDN will not rewrite the filename in the client request. The way this is normally done is the origin server chooses which file to serve (e.g. via nginx config) based on the Accept-Encoding request header and includes a Vary: Accept-Encoding response header to let the CDN know.

          – elving
          Mar 11 at 22:20













          Thanks so much for helping @elving. Shouldn't the CloudCDN just kind of point to a Google Cloud Storage bucket and the client should be served a file from the edge? By making a round trip to origin/nginx, it would seem to defeat the purpose of using CloudCDN(edge). Does CloudCDN distribute the web server/origin/nginx on the edge? If this is the case that sounds great, if not I'm still not fully understanding how this can all work. Sorry if I'm mangling verbiage

          – Matthew Harwood
          Mar 11 at 23:40






          Thanks so much for helping @elving. Shouldn't the CloudCDN just kind of point to a Google Cloud Storage bucket and the client should be served a file from the edge? By making a round trip to origin/nginx, it would seem to defeat the purpose of using CloudCDN(edge). Does CloudCDN distribute the web server/origin/nginx on the edge? If this is the case that sounds great, if not I'm still not fully understanding how this can all work. Sorry if I'm mangling verbiage

          – Matthew Harwood
          Mar 11 at 23:40




















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071013%2fdoes-cloudcdn-support-the-serving-of-brotli-encoding%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

          2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

          Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme