-
Notifications
You must be signed in to change notification settings - Fork 299
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
unable to activate gzip #493
Comments
@scaccogatto This looks like an Nginx specific issue. Going to close this. Feel free to re-open if you think this is an Ingress-GCE issue. /close |
@rramkumar1: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Sorry but this is not a Nginx issue. The fact that you cannot enable gzip with Ingress-GCE is a Ingress-GCE issue not an nginx one. So this confirm this is actually not a bug but a missing feature I suppose. |
You said: "Response Headers does not contain: content-encoding: gzip" Unless I am misunderstanding your setup, doesn't this mean your application needs to return the proper headers? |
Can you post your HTTP request and response headers? |
@rramkumar1 My application does return the proper headers, in fact, if I run the same application under a Ingress-Nginx (setting the right annotations), gzip works as expected with no configuration edit.
@bowei I can't. I am working on a company cloud and I am not planning to enable another load balancer very soon but you can refer to:
and
I hope this is enough |
@scaccogatto can you post an anonymized subset of headers? This setup should be easy to repro if we have that information. |
ping @scaccogatto |
You can repro it with this kind of configuration: I am sorry I am not starting another GCE Ingress very soon. |
GCLB will NOT compress backend responses, It's a known "feature", while Nginx is capable of doing so. I believe this is what @scaccogatto would want, that GCLB were able to compress non-compressed backend responses. There's a petition for GCLB to implement that. |
I think I'm facing the same issue here. And no, @acasademont I don't think that's the problem - I want to use the gzip from nginx not GCLB. Without gzip (when hitting the ingress): |
I'm looking into this deeper. I'm going to see if I can reproduce the issue with a simpler setup. |
@AdrianNeatu I was unable to reproduce this, albeit with a much simpler setup. I used an echoserver that gzip's the response body and returns the "Content-Encoding: gzip" header when the request header "Accept-Encoding: gzip" is present. The response headers were fine upon a request being made. Is it possible that your nginx server has some sort of setup that does not compress responses in certain situations? |
Ah I think I found the issue @scaccogatto @AdrianNeatu does the following documentation help? https://blog.percy.io/tuning-nginx-behind-google-cloud-platform-http-s-load-balancer-305982ddb340 I'm going to close this for now assuming that the fix mentioned there will solve the problem. /close |
With my system:
Ingress config: https://gist.github.com/scaccogatto/8796908c22cc6437fc645f3fba587edd
Backend nginx config: https://github.com/scaccogatto/vue-nginx/blob/master/docker/nginx.conf
Following:
https://cloud.google.com/load-balancing/docs/https/setting-up-https#compression-not-working
As you can see from my configs gzip directives are here, also I found that my Request Headers contains accept-encoding: gzip, deflate, br.
Unfortunately when I run Chrome's audit it says that I should enable text compression even if most of online gzip checkers say that gzip is active (but I don't trust them)
Also I found that my Response Headers does not contain:
content-encoding: gzip
so I assume gzip is not working correctly.Searching on the net I found this: https://stackoverflow.com/a/48084669/10412176 (that actually says the same things that's on the docs) and I am starting to think than I am changing the wrong configuration and the docs reefer to the Ingress configuration (that is not reachable as fas as I know)
I don't really know if it is a bug or not so I'm asking here.
The text was updated successfully, but these errors were encountered: