nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?
Igor Sysoev
igor at sysoev.ru
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, http://drupal.org/project/parallel
>
> 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 {
server_name example.com
cdn1.example.com
cdn2.example.com
cdn3.example.com
;
location / {
proxy_pass http://backend;
...
}
location ~ \.(js|css|gif|jpe?g|png)$ {
proxy_pass http://backend;
...
proxy_cache CACHE;
}
The files http://cdn1.example.com/some.js and http://cdn2.example.com/some.js
will be stored in nginx cache as single file with key
http://backend/some.js.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list