<div class="gmail_quote"><br>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?<div><div></div><div class="h5"><br><br><div class="gmail_quote">
On Wed, Oct 20, 2010 at 12:04 AM, Ryan Malayter <span dir="ltr">&lt;<a href="mailto:malayter@gmail.com" target="_blank">malayter@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Tue, Oct 19, 2010 at 6:54 AM, Splitice &lt;<a href="mailto:mat999@gmail.com" target="_blank">mat999@gmail.com</a>&gt; wrote:<br>


&gt; Seconded. Also the ability to cache gzip is a must<br>
<br>
</div>This can be done in nginx now by &quot;layering&quot; two nginx server blocks<br>
together. The &quot;front&quot; one implements proxy_cache, while the back one<br>
does compression and talks to the origin server. You get twice the<br>
number of connections when you&#39;re actually talking to a back-end, but<br>
if your cache hit ratio is high, that shouldn&#39;t matter and the<br>
connections are very short-lived.<br>
<br>
You should also &quot;normalize&quot; the incoming accept-encoding headers to<br>
either &quot;gzip&quot; or &quot;&quot;, and use that as part of the proxy cache key.<br>
<br>
Something like this (untested syntax):<br>
<br>
#frontend configuration which talks to client and caches<br>
server {<br>
  listen 80<br>
  set $myacceptencoding &quot;&quot;;<br>
  if ($http_accept_encoding *~ &quot;gzip&quot;) {<br>
    set $myacceptencoding &quot;gzip&quot;;<br>
  }<br>
  location / {<br>
  proxy_set_header &quot;Accept-Encoding&quot; $myacceptencoding;<br>
  proxy_cache my_cache_zone_name;<br>
  proxy_cache_key &quot;$scheme$host$request_uri$myacceptencoding&quot;<br>
  proxy_pass <a href="http://127.0.0.01:10080" target="_blank">http://127.0.0.01:10080</a><br>
  }<br>
}<br>
#backend server block which talks to origin and compresses<br>
server {<br>
  listen 10080<br>
  gzip on;<br>
  gzip_http_version 1.0;<br>
  gzip_proxied any;<br>
  gzip_types text/css text/javascript text/xml application/x-javascript;<br>
  location / {<br>
  proxy_pass <a href="http://realbackend" target="_blank">http://realbackend</a><br>
  }<br>
}<br>
<font color="#888888"><br>
--<br>
RPM<br>
</font><div><div></div><div><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><font color="#888888">-- <br><a href="http://thewarezscene.org" target="_blank">Warez Scene</a> <a href="http://www.nexusddl.com" target="_blank">Free Rapidshare Downloads</a><br>
<br>
</font></div><br><br clear="all"><br>-- <br><a href="http://thewarezscene.org" target="_blank">Warez Scene</a> <a href="http://www.nexusddl.com" target="_blank">Free Rapidshare Downloads</a><br><br>