我可以使用哪种软件来设置caching时发送文件的反向代理?

我需要build立一个HTTP反向代理,能够caching请求到上游服务器。

上游服务器只提供静态文件。

我面临的问题是,我需要一个能够尽快开始第一个字节的代理(它不能等待整个请求缓冲),而仍然caching。 这是因为我的文件可能相当大(几百兆字节),但应用程序的要求是有快速的响应时间。

我试图使用nginx,但是当我禁用proxy_buffering它停止caching。

有没有广泛可用,经过充分testing的开源项目可以做到这一点? 漆? 乌贼? HAProxy的?

清漆会对工作有好处:

sub vcl_backend_response { # ... # Large static files are delivered directly to the end-user without # waiting for Varnish to fully read the file first. # Varnish 4 fully supports Streaming, so use streaming here to avoid locking. if (bereq.url ~ "^[^?]*\.(mp[34]|rar|rpm|tar|tgz|gz|wav|zip|bz2|xz|7z|avi|mov|ogm|mpe?g|mk[av]|webm)(\?.*)?$") { unset beresp.http.set-cookie; set beresp.do_stream = true; set beresp.do_gzip = false; # Don't try to compress it for storage } # ... } 

您可以设置两个nginx服务器,一个启用proxy_buffering,另一个将caching来自上游的响应。