Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate supporting Brotli compression on Pattern Library & CDN #288

Open
james-nash opened this issue May 30, 2019 · 1 comment
Open
Labels
help wanted INVITATION: Indicates that a maintainer wants help on an issue or pull request infrastructure CATEGORY: Infrastructure related - e.g. updates to build process, tests, tooling, etc. 🌟 enhancement TYPE: Indicates new feature requests

Comments

@james-nash
Copy link

Is your feature request related to a problem? Please describe.
If I'm not mistaken, our static CDN assets and Pattern Library both support gzip compression. However, it would be nice to add support for Brotli which offers better compression.

If this works, we can then implement the same thing on the Buildit website's hosting.

Describe the solution you'd like

  • Investigate if/how we can add support for Brotli encoding on our current hosting setup
  • If not too cumbersome, add it. And, if it can't be added, document why that is somewhere.
@james-nash james-nash added 🌟 enhancement TYPE: Indicates new feature requests help wanted INVITATION: Indicates that a maintainer wants help on an issue or pull request infrastructure CATEGORY: Infrastructure related - e.g. updates to build process, tests, tooling, etc. labels May 30, 2019
@thehammeranderson
Copy link
Contributor

thehammeranderson commented Jun 4, 2019

This explains what would have to be done because it is not supported natively by CloudFront:
https://medium.com/@felice.geracitano/brotli-compression-delivered-from-aws-7be5b467c2e1
Essentially would have to have more folders with copies of files that are gzipped or Brotli'd at build time and placed in their respective folders, then have Lambda code that figures out if the request supports Brotli or gzip and append to the requested URI to point to the appropriate version of the file.

Sounds like the complexity of the build/deploy and request handling overhead of the two necessary Lambdas would outweigh the benefit. Unless you didn't mind just having only build time Brotli compressed files that are uploaded to S3 and only those are served up in the existing locations. The metadata would have to be tweaked for the files to show the Brotli encoding. Of course this won't work if whoever making the call can't handle Brotli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted INVITATION: Indicates that a maintainer wants help on an issue or pull request infrastructure CATEGORY: Infrastructure related - e.g. updates to build process, tests, tooling, etc. 🌟 enhancement TYPE: Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

2 participants