I’m trying to setup a reverse proxy for some private downloads. Here is
3 Storage servers with High capacity but slow HDDs running nginx
1 loadbalancing server with SSD and high internet uplink.
my file sizes are several hundred megabytes (500+ up to 2GB) running
downloaders are on slow connections with download managers with up to 16
connections for each file
here is what I want to do:
a user sends a request to the SSD server, the ssd server requests the
from Slow servers and caches to response to its fast HDD and serving it
the client. But If I use the proxy_cache , the file serving has to wait
the file has been completly transfered and cache on the SSD disk wich
several files are requested at the same time) results in a slow
and timeout or other errors on the client side. so this is not an
However I think proxy_buffering is answer to my problem, I think this
each part of the requested file (defined by ranges header) is cached
- Am I right?
If I’m right then
- how can I tell the nginx, to buffer like 5mb of requested part in
(and the excess on the SSD disk) and serve the file to the client until
client has downloaded the part and then request another 5mb?
I’m looking for a setting like output_buffers 1 5m; but for the proxied
- Is there a better solution?
Posted at Nginx Forum: