Download full mp4 file with proxy_cache or proxy_store !!

shahzaib shahzaib shahzaib.cb at gmail.com
Fri Jun 20 19:14:36 UTC 2014


@Lukas, we're using nginx-1.6 and byte range caching is already enabled by
default(i guess). Below is the curl request :-

 curl -H Range:bytes=16- -I
http://videos.files.com/files/videos/2014/06/20/14032606291de19-360.mp4
HTTP/1.1 206 Partial Content
Server: nginx
Date: Fri, 20 Jun 2014 13:36:05 GMT
Content-Type: video/mp4
Content-Length: 25446010
Connection: keep-alive
Last-Modified: Fri, 20 Jun 2014 11:04:11 GMT
ETag: "53a4152b-184468a"
Expires: Fri, 27 Jun 2014 13:36:05 GMT
Cache-Control: max-age=604800
X-Cache-Status: HIT
Content-Range: bytes 16-25446025/25446026

Could you tell me how can i check using curl that if nginx downloading the
whole file each time the user seek the video with mp4 psuedo module  i.e
http://url/files/videos/test-360.mp4?start=39.

I am newbie to proxy_cache and much confused about the behavior.

I know rsync is better solution but it cannot cache the videos on fly
instead to have a schedule to rsync file in off-peak hours. We want to
cache only videos which are accessed 10 times and nginx is doing well with
proxy_cache_min directive.


On Thu, Jun 19, 2014 at 8:36 PM, Lukas Tribus <luky-37 at hotmail.com> wrote:

> > we're using two servers (one proxy and one backend). Proxy server
> > is using proxy_cache to cache mp4 files from backend server and working
> > fine. When i stream a full video from cache, the header response gives
> > me the cache-status: HIT but whenever i seek the mp4 file i.e
> > http://url/test.mp4?start=33 , the Cache-status changes to : MISS .
> > Does that mean, the proxy server is again downloading the same file
> > after the 33 seconds ?
> >
> > Can't i use nginx proxy_cache to download whole mp4 file and and than
> > seek from it instead of fetching the file again and again ? Does
> > proxy_store has this functionality if not proxy_cache ?
>
> You would not have this problem with local files (rsync'ing them to your
> server, as was previsouly suggested in the other thread).
>
>
> What nginx release are you using? You probably need at least 1.5.13 as
> per:
> http://mailman.nginx.org/pipermail/nginx/2014-June/044118.html
>
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140621/01603feb/attachment.html>


More information about the nginx mailing list