nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

Igor Sysoev igor at
Wed Apr 28 23:42:48 MSD 2010

On Wed, Apr 28, 2010 at 12:29:29PM -0700, Ben DJ wrote:

> > I did not understand what that parallel CDN does and what problem you
> > have encountered.
> A good description is here,
> Basically, serving various content types in parallel from Varnish
> in-memory caches, in particular when memcache(d) is not an option due
> to low RAM constraints (on a VPS ...).
> The performance boost -- admittedly under the right concurrent loads
> -- can be dramatic.

I understand the idea, but do not see any issues with nginx.
Probably you need something like this:

   server {

       location / {
           proxy_pass             http://backend;

       location ~ \.(js|css|gif|jpe?g|png)$ {
           proxy_pass             http://backend;
           proxy_cache            CACHE;

The files and
will be stored in nginx cache as single file with key

Igor Sysoev

More information about the nginx mailing list