Fwd: nginx support for http/1.1 backend

SplitIce mat999 at gmail.com
Wed Oct 20 09:26:54 MSD 2010


Ive used that solution in the past, I dont consider it viable. Anyone here
have experience with echo async subrequest, any idea if it could do the
same?


On Wed, Oct 20, 2010 at 12:04 AM, Ryan Malayter <malayter at gmail.com> wrote:

> On Tue, Oct 19, 2010 at 6:54 AM, Splitice <mat999 at gmail.com> wrote:
> > Seconded. Also the ability to cache gzip is a must
>
> This can be done in nginx now by "layering" two nginx server blocks
> together. The "front" one implements proxy_cache, while the back one
> does compression and talks to the origin server. You get twice the
> number of connections when you're actually talking to a back-end, but
> if your cache hit ratio is high, that shouldn't matter and the
> connections are very short-lived.
>
> You should also "normalize" the incoming accept-encoding headers to
> either "gzip" or "", and use that as part of the proxy cache key.
>
> Something like this (untested syntax):
>
> #frontend configuration which talks to client and caches
> server {
>  listen 80
>  set $myacceptencoding "";
>  if ($http_accept_encoding *~ "gzip") {
>    set $myacceptencoding "gzip";
>  }
>  location / {
>  proxy_set_header "Accept-Encoding" $myacceptencoding;
>  proxy_cache my_cache_zone_name;
>  proxy_cache_key "$scheme$host$request_uri$myacceptencoding"
>  proxy_pass http://127.0.0.01:10080
>  }
> }
> #backend server block which talks to origin and compresses
> server {
>  listen 10080
>  gzip on;
>  gzip_http_version 1.0;
>  gzip_proxied any;
>  gzip_types text/css text/javascript text/xml application/x-javascript;
>  location / {
>  proxy_pass http://realbackend
>  }
> }
>
> --
> RPM
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>



-- 
Warez Scene <http://thewarezscene.org> Free Rapidshare
Downloads<http://www.nexusddl.com>




-- 
Warez Scene <http://thewarezscene.org> Free Rapidshare
Downloads<http://www.nexusddl.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20101020/88a676a0/attachment.html>


More information about the nginx mailing list