Welcome! Log In Create A New Profile

Advanced

Can proxy_cache gzip cached content?

February 14, 2012 07:08AM
Hello,

I'm looking at using Nginx as a reverse proxy to cache a few millions HTML
pages coming from a backend server.

The cached content will very seldom (if at all) change so both proxy_cache
and proxy_store could do, but all page URLs have a "/foo/$ID" pattern and
IIUC with proxy_store that would cause millions of files in the same
directory, which the filesystem might not be ecstatic about. So for now I'm
going with proxy_cache and two levels of directories. All is going great in
my preliminary tests.

Now, rather than caching uncompressed files and gzipping them before
serving them most of the time, it would be great if cached content could be
gzipped once (on disk) and served as such most of the time. This would
decrease both disk space requirements (by 7-8 times) and processor load.

Is this doable? Patching/recompiling nginx as well as using Lua are fine
with me. Serving gzipped content from the backend would in theory be
possible though for other reasons better avoided.

Thanks for any insight!
Massimiliano
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 286
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready