Redirect on specific threshold !!
steve at greengecko.co.nz
Sun Jun 14 21:20:56 UTC 2015
On 15/06/15 05:12, 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 ?
> Thanks in advance.
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
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 Holdoway BSc(Hons) MIITP
More information about the nginx