Forum: NGINX Combining proxy_store and proxy_cache values!

13731c628e20ffd83b6114ff2c406272?d=identicon&s=25 shahzaib mushtaq (shahzaib12)
on 2014-08-27 14:22
(Received via mailing list)
Hi,

  I am using proxy_store on edge server to replicate mp4 files from
origin
server when user request for the video file. The reason i am not using
proxy_cache is, when user seeks through the mp4 video,proxy_cache keeps
on
downloading whole video file with different Keys if multiple users
accessing single video with different cache Keys i.e

http://file.video.com?start=32
http://file.video.com?start=54

The problem with proxy_store is, its not much flexible as proxy_cache
has
different variables to adjust and most useful is proxy_cache_min_use.

I need proxy_store to check for requested file and if file is requested
first time it should be serve from origin server instead of downloading
the
whole file. Can i use some option like proxy_cache_min_use for
proxy_store
? If not, is there some other way for it ?

Regards.
Shahzaib
405f7785199e6fb200f5cd68af04a5f8?d=identicon&s=25 Roman Arutyunyan (Guest)
on 2014-08-27 19:19
(Received via mailing list)
Hi,

On 27 Aug 2014, at 16:21, shahzaib shahzaib <shahzaib.cb@gmail.com>
wrote:

> Hi,
>
>   I am using proxy_store on edge server to replicate mp4 files from origin
server when user request for the video file. The reason i am not using 
proxy_cache
is, when user seeks through the mp4 video,proxy_cache keeps on downloading whole
video file with different Keys if multiple users accessing single video with
different cache Keys i.e
>
> http://file.video.com?start=32
> http://file.video.com?start=54

The mp4 module does not work with the nginx cache.
You can either proxy the mp4 module output from the backend
or serve the entire cached mp4 file without using the mp4 module.

> The problem with proxy_store is, its not much flexible as proxy_cache has
different variables to adjust and most useful is proxy_cache_min_use.
>
> I need proxy_store to check for requested file and if file is requested first
time it should be serve from origin server instead of downloading the whole 
file.
Can i use some option like proxy_cache_min_use for proxy_store ? If not, is 
there
some other way for it ?
`
When you use proxy_cache_min_uses an empty cache entry is created
in memory which holds the counter.  With proxy_store theres nothing
like that.  Nginx just saves the input to a file.  It looks like
theres no easy way to do what you want.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.