Redirect on specific threshold !!

steve steve at greengecko.co.nz
Sun Jun 14 21:20:56 UTC 2015


Hi,

On 15/06/15 05:12, shahzaib shahzaib wrote:
> Hi,
>
>    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 ?
>
> Thanks in advance.
>
> Regards.
> Shahzaib
>
>
>
>
On the assumption that you're hosting with a linux infrastructure, this 
is simply done by just adding more memory! By default any spare memory 
will be used to cache common files.

If you want more control over it, then set your cache area up on a tmpfs 
backed partition. However, you'll then have to manage what you cache 
yourself.

With setups like this, it's normally the bandwidth of the network that 
becones the bottleneck. Maybe a bit of round-robin DNS would help with this?

Steve

-- 
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa



More information about the nginx mailing list