misc-server icon indicating copy to clipboard operation
misc-server copied to clipboard

We should enable Brotli!

Open domenic opened this issue 8 years ago • 6 comments

Somehow.

Via https://twitter.com/DasSurma/status/924346557864054785

domenic avatar Oct 28 '17 23:10 domenic

We might get it with Akamai without doing any work.

foolip avatar Oct 29 '17 21:10 foolip

We used Debian, right? https://blobfolio.com/2017/06/nginx-brotli-on-debian-stretch-without-any-source-monkeying/ has some instructions. Seems it requires installing an external module. Maybe it's better to wait for native Nginx support?

annevk avatar Oct 30 '17 08:10 annevk

That involves replacing the default nginx-full package with a package from another maintainer, and it's likely that security updates aren't quite as speedy. So, I'd rather wait until support is enabled by default in Debian, but won't stand in the way of anyone else who wants to try.

foolip avatar Oct 30 '17 14:10 foolip

FWIW @domenic @foolip @annevk have used it thoroughly the past year. Currently using in production. Cute content negotiation trick we do with the lib (besides typical Encoding negotiation) is using brötli Accept-Encoding: br to internally trigger .es Ecmascript vs ES5 .js distributions. With the Safari update surprisingly the br accept encoding overlaps much with ES6 availability.

That being said, below are links to a brief synopsis of what's been worked on with @tmornini @brandondees. and a link to the curation of most of what we need to know (Down to nginx packages I believe).

I know my way around an nginx.conf file but understand the brötli much better. However only use it as a build step since the core lib is a tiny static asset. Haven't had experience (yet) with "real time". @tmornini who is superior to me on NGINX may have some thoughts? Am I wildly oversimplifying or something reasonable to take a stab at...

Please advise.

P.S. 🙏 @annevk thanks for that blobfolio link. I don't believe i have that on the .md file and will add now. as that section hasn't been updated in a while.

Relative links:

  • https://twitter.com/DasSurma/status/924346557864054785
  • https://github.com/devpunks/snuggsi/tree/master/dist#brotli-compression-snuggsiminbr

Don't tip the scale

We actually have a "weight check" to ensure the platform lib never exceeds 1 MTU ethernet frame. (1500OCTETS). 😂

capture d ecran 2017-11-19 a 05 14 41

snuggs avatar Nov 19 '17 10:11 snuggs

This seems more mainstream now; at least, https://docs.nginx.com/nginx/admin-guide/dynamic-modules/brotli/ does not mention installing any non-default package sources.

domenic avatar Jun 09 '20 21:06 domenic

We are still on Debian 9 and nginx 1.10.3. I've tried creating a new droplet with Debian 10, but it also doesn't have a package called nginx-plus-module-brotli. I think we'd need to add some additional deb repository for this, or build from source.

foolip avatar Jun 10 '20 11:06 foolip