-
Notifications
You must be signed in to change notification settings - Fork 332
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
Gzip/Brotli compressions on NGINX Unit #787
Comments
Unit itself, does not support compressing responses. Depending on your app though, this is something you could do app side. For example, Ruby has a Deflater middleware that one can enable, or, you can put Nginx in front on Unit and have Nginx do the work for you. |
Hi @nailarch as @travisbell already mentioned currently there is no GZip support in Unit. But this is something on our list of features. |
Unit can serve static files but there is a trick to provide separate match for each of values from |
If you're interested in testing some patches that do gzip, there's #914 It would be interesting to see testing on real world workloads and connections, and not just my localhost loops. :) |
is this feature still in roadmap? or better to control compression at app-level? |
I still have my patches around. I found some things that I'd like to polish (e.g., I discovered Unit's numeric parsing functions recently in a different discussion, so I wanted to use those instead of the strtoul(3) wrapper I added in them), and they also need rebasing. However, I don't work at NGINX anymore, so those patches are bit rotting. |
We are working on this feature using @alejandro-colomar patches for inspiration but taking a slightly different approach... watch this space! |
Hi @ac000, While the Apache 2.0 license certainly allows it, and anyway, I wrote most of that code as part of my employement at F5 (so F5 is the owner of most of the code), I find it somewhat disrespectful to take my patches and re-develop them in a closed-source manner. Would you mind discussing what is being done to those patches in public? How much different is that slightly different approach and why? From what revision of the patches are you taking inspiration? Cheers, |
Hi Alex, As has been discussed in the past, unfortunately your patches are not in After discussing this with @hongzhidao I have decided to re-do this The first change is to not introduce a generic filter mechanism, this Other differences are
If you have 100's of routes all wanting compression, this will save a
Well that's the plan anyway, we'll see how it pans out... As for doing this 'in a closed-source manner', I don;t think this is any Proper attribution will be given where appropriate.
Ah, I see you've removed it now, but yeah it's this Sorry if you've took offense to any of this... |
Actually, never discussed. I only heard that from you in a recent mail, with no actual discussion, but rather a vague reference to Zhidao's also vague opinion on the patches.
I agree. There are a few things I wanted to clean up.
Hmmm, yeah, could agree. That was the most obscure part of the integration with Unit.
Hmm.
Hmm, I think my implementation clearly supports multiple compressors. The intervention to add more should be minimal, I think. But yeah, if something can be improved in this front, it's good.
Hmm, similar thoughts here (but yeah, I had to deal with those weird buffers; maybe that can be improved by changing Unit internals).
Well, if some patches are already working and published, the usual thing to do is to say "hey, I don't like X from your patches, will try Y instead".
Thanks!
It's online again.
The branch was in the middle of a rework. I don't remember its state too well. I'd suggest inspiring on the tag
I did, but not specifically from you; I appreciate you. ;) Have a lovely day! |
Enabling gzip/brotli compression on pure NGINX is relatively simple.
However, I want to enable gzip/brotli compression for NGINX Unit.
I'm not seeing anything on the NGINX Unit configuration man page about how to do the same for NGINX Unit.
Is the option not currently supported?
The text was updated successfully, but these errors were encountered: