amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
523 stars 39 forks source link

[Feature Request] - add brotli support for nginx #561

Open daniejstriata opened 10 months ago

daniejstriata commented 10 months ago

Brotli generally achieves higher compression ratios compared to gzip. I don't see Brotli compression added to nginx. This is also the case for Fedora (and other distros I looked at). Is it a licensing problem? Reading up about brotli is sounds to be beneficial and I've always built my own nginx package with brotli enabled.

Could AL2023 add Brotli compression to its nginx packages as a module?

stewartsmith commented 10 months ago

It looks like this is provided by https://github.com/google/ngx_brotli (as linked to by https://docs.nginx.com/nginx/admin-guide/dynamic-modules/brotli/ ) which isn't currently packaged for Fedora (or Amazon Linux).

It looks like nginx provides this pre-built as part of nginx plus.

daniejstriata commented 10 months ago

@stewartsmith Correct. It's included in nginx plus at a cost.

I'm able to build the module but manually. I'll see if I can share a src rpm for that module that could be built automatically in COPR.

marshallsanders commented 6 months ago

I'd also love if this was available.

I did manage to compile it and stick it in an s3 bucket, which I download to our elastibeanstalk environments which use AL2023 via a platform prebuild hook, but then I have to copy over the entire beanstalk default nginx.conf file since you can't add the brotli modules to nginx anywhere other than the base nginx.conf file. It works fine but does feel pretty brittle in terms of being able to upgrade in the future.

I'm not sure we'd ever see direct brotli support in beanstalk, but I'd at least settle for it being available as a package for AL2023 so I didn't feel quite so sad about upgrading from Amazon Linux 2.

dvershinin commented 3 weeks ago

If you're looking for a way to enable Brotli compression with NGINX on Amazon Linux 2023 (AL2023), I'm pleased to share that we have it available in our NGINX repository at GetPageSpeed. You can check out the repository details and available packages here:

🔗 NGINX Repo for Amazon Linux 2023 (aarch64)

Our repository includes Brotli support for NGINX, along with many other NGINX modules, providing a more extensive set of features compared to the standard NGINX package. It's available by subscription, similar to NGINX Plus, but at a significantly lower cost and with a broader range of module packages.

Notably, we've recently added ARM64 (aarch64) support to our package offerings, making it easier to deploy optimized NGINX setups on ARM-based instances like AWS Graviton. Moreover all our NGINX come with full support for HTTP/3 and kLTS for the best performance.