atom feed3 messages in ru.sysoev.nginxRe: Download Large Files Directly
FromSent OnAttachments
Maik UngerApr 5, 2011 8:35 am 
Alexander KolesenApr 5, 2011 9:00 am 
Maik UngerApr 5, 2011 10:55 am 
Subject:Re: Download Large Files Directly
From:Alexander Kolesen (kole@gmail.com)
Date:Apr 5, 2011 9:00:40 am
List:ru.sysoev.nginx

Hy @ All,

Is there an Option in nginx to set a limit for the download filesize, so that the requested file will be downloaded from the proxied server (apache) directly?

Example:

testfile.bin over 10 MB, will send directly to apache

Client --> Apache

testfile.bin under 10 MB, will send to nginx cache and then to apache

Client --> nginx Cache --> Apache

Any Solutions?

You can implement the following solution: - any request passes to the Apache - probe the file size - if size over 10MB - serve it like you want - if under - send X-Accel-Redirect response to nginx

http://wiki.nginx.org/XSendfile