Forward single request to upstream server via proxy_store !!

Reinis Rozitis r at
Thu Sep 25 21:36:51 UTC 2014

> It will also prevent users seeking the video because the arguments after 
> "?" will remove whenever user will try to seek the video stream, isn't it 
> ?

In general it shouldn’t since the ‘?start=’ is handled by nginx and not 
varnish, but I’m not exactly sure how the mp4 module of nginx handles a 
proxied request.
You have to test it.

In worst case scenario imho only the first request (before landing on the 
proxy_store server) will “fail” eg play from the beginning instead of the 
time set.

> Well, only proxy_store is able to fulfill my requirements that is the 
> reason i'll have to stick with it.

Well you can try to use varnish as the streamer, just need some (web)player 
supporting byte-range requests for the seeking ( ).

> I am bit confused about the varnish. Actually, i don't need any kind of 
> caching within the varnish as nginx already doing it via proxy_store. I 
> just need varnish to merge the subsequent requests into 1 and forward it 
> to nginx and i think varnish is doing it pretty well. Nevertheless, i am 
> confused if malloc caching will have any odd effect on the stream behavior 
> ?

You can try to pass the request without caching:

sub vcl_fetch {
return (pass);

(maybe even do it in the vcl_recv stage but again I'm not exactly sure if in 
that case the request coalescing works).


More information about the nginx mailing list