GZIP problem with backend hosts
Igor Sysoev
is at rambler-co.ru
Fri Aug 29 14:15:40 MSD 2008
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.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list