Redirect on specific threshold !!
Valentin V. Bartenev
vbart at nginx.com
Mon Jun 15 10:45:42 UTC 2015
On Sunday 14 June 2015 22:12:37 shahzaib shahzaib wrote:
> We're using Nginx to serve videos on one of our Storage server(contains
> mp4 videos) and due to high amount of requests we're planning to have a
> separate caching Node based on Fast SSD drives to serve "Hot" content in
> order to reduce load from Storage. We're planning to have following method
> for caching :
> If there are exceeding 1K requests for http://storage.domain.com/test.mp4 ,
> nginx should construct a Redirect URL for rest of the requests related to
> test.mp4 i.e http://cache.domain.com/test.mp4 and entertain the rest of
> requests for test.mp4 from Caching Node while long tail would still be
> served from storage.
> So, can we achieve this approach with nginx or other like varnish ?
You can use limit_conn and limit_req modules to set limits:
and the error_page directive to construct the redirect.
wbr, Valentin V. Bartenev
More information about the nginx