Welcome! Log In Create A New Profile

Advanced

Re: cache gzipped content with proxy_pass

May 26, 2011 08:28PM
I've been following this discussion and I'm anxiously waiting for some resolution. I think Maxim's approach is right: implementing a gzip_cache filter that could be used for caching any content. This would allow for much more flexibility than just using it for proxy_pass/proxy_cache.

This could effectively eliminate the gzip_static filter. If you have plain HTML served and "gzip on;" plus something like "gzip_cache on;" all of your plain text content would be served using the cached gzip content. Similarly, you would be able to use this for proxy_pass, proxy_store, fastcgi_pass, etc. It wouldn't matter since the caching of the gzip'd content would be stored in the gzip_cache filter and negotiated directly with the client.

There's a lot of chatter about using Varnish or Lighty or <insert another web/cache server here> to give Nginx pre-gzipped data in a proxy response. This sounds absolutely horrible. The bottom line is that if Nginx is the webserver that is dealing with the client directly, it should then be Nginx's responsibility to serve the appropriate version (gzip'd or plain text) content based on the client's request headers. That being said, Nginx should be managing it's own cache of filtered items.

The same goes for the image_filter. Currently, I use the image_filter for a project and I'm bummed out that Nginx is scaling the same image over and over each time it is requested. An image_filter_cache would be another great feature.

Am I on the right track?
Subject Author Posted

cache gzipped content with proxy_pass

chrisl August 16, 2010 08:56AM

Re: cache gzipped content with proxy_pass

Maxim Dounin August 16, 2010 10:52AM

Re: cache gzipped content with proxy_pass

chrisl August 21, 2010 07:27AM

Re: cache gzipped content with proxy_pass

adamchal May 26, 2011 08:28PM

Re: cache gzipped content with proxy_pass

SplitIce May 26, 2011 11:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 55
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