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
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
add a comment |
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
add a comment |
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
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
encoding compression brotli google-cloud-cdn
asked Mar 8 at 21:07
Matthew HarwoodMatthew Harwood
6,1461983164
6,1461983164
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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