11 messages in ru.sysoev.nginxRe: GZIP problem with backend hosts
FromSent OnAttachments
Alan WilliamsonAug 28, 2008 4:36 am 
ngin...@public.gmane.orgAug 28, 2008 9:22 am 
Alan WilliamsonAug 29, 2008 1:41 am 
Igor SysoevAug 29, 2008 1:54 am 
Alan WilliamsonAug 29, 2008 3:04 am 
Igor SysoevAug 29, 2008 3:15 am 
Alan WilliamsonAug 29, 2008 4:07 am 
Igor SysoevAug 29, 2008 4:26 am 
Olivier BonvaletAug 29, 2008 4:32 am 
Alan WilliamsonAug 29, 2008 4:46 am 
Igor SysoevAug 29, 2008 4:58 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: GZIP problem with backend hostsActions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Aug 29, 2008 3:15:17 am
List:ru.sysoev.nginx

On Fri, Aug 29, 2008 at 11:04:57AM +0100, Alan Williamson wrote:

Igor Sysoev wrote:

On Fri, Aug 29, 2008 at 09:41:42AM +0100, Alan Williamson wrote:

no one got anything input here?

seems to be a fairly big failing in NGINX here. Why would it spend extra time and resources decompressing outgoing content

nginx can not decompress proxied response. In your case probably backend sends uncompressed response.

okay so lets ask the question another way.

Scenario#1: Hit Backend#1 directly; get GZIP'd content

Scenario#2: Hit nginx which then proxies to Backend#1; get raw content

Soooo ... either ... nginx is decompressing, which you claim it is not, which leaves that nginx isn't passing on all the HTTP headers to the backend, including the all important:

"Accept-Encoding: gzip,deflate"

If you did not set proxy_set_header Accept-Encoding "";

then nginx will pass it backend.

I do not know conditions when Amazon may refuse to compresses response, it may have simillar limits as nginx has:

1) gzip_http_version: nginx by default compresses HTTP/1.1 requests only, Amazon may do the same. nginx talks to backend using HTTP/1.0 while browsers usually use HTTP/1.1.

2) gzip_proxied: nginx by default disables compression if a request has "Via" header.