Welcome! Log In Create A New Profile

Advanced

Re: Can proxy_cache gzip cached content?

February 15, 2012 09:55AM
bard Wrote:
-------------------------------------------------------
> Thanks for the pointers. As I wrote, I'd rather
> avoid gzipping in the
> backend, but if that's the only option so be it.
>

There's no reason the "backend" for your caching layer cannot be another nginx server block running on a high port bound to localhost. This high-port server block could do gzip compression, and proxy-pass to the back end with "Accept-Encoding: identity", so the back-end never has to do compression. The backend server will have to use "gzip_http_version 1.0" and "gzip_proxied any" to do compression because it is being proxied from the front-end.

There might be a moderate performance impact, but because you're caching at the "frontmost" layer, the number of back-end hits should be small.

Also note there may be better options in the latest nginx versions, or by using the gunzip 3rd-party module:
http://mdounin.ru/hg/ngx_http_gunzip_filter_module/file/27f057249155/README

With the gunzip module, you can configure things so that you always cache compressed data, then only decompress it for the small number of clients that don't support gzip compression.

--
RPM
Subject Author Posted

Can proxy_cache gzip cached content?

bard February 14, 2012 07:08AM

Re: Can proxy_cache gzip cached content?

rmalayter February 14, 2012 08:49AM

Re: Can proxy_cache gzip cached content?

bard February 14, 2012 07:42PM

Re: Can proxy_cache gzip cached content?

rmalayter February 15, 2012 09:55AM

Re: Can proxy_cache gzip cached content?

bard February 17, 2012 08:04AM

Re: Can proxy_cache gzip cached content?

bard February 18, 2012 03:44PM

Re: Can proxy_cache gzip cached content?

Maxim Dounin February 18, 2012 06:32PM

Re: Can proxy_cache gzip cached content?

bard February 19, 2012 05:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 86
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready