Caching servers in Local ISPs !!

itpp2012 nginx-forum at nginx.us
Fri May 9 20:01:46 UTC 2014


> So on easy note, i would have to assign those machines the preferred
> dns
> and use rsync on regular basis in order to make identical data 
> between
> local caching machines and main front end content servers ?

Yep.

> What if a client request a video which is not in local caching server
> ?

You need to maintain a cache index on each cache machine in order to
determine what is available to the users, for most content you need to do
this anyway since not all content can legally be everywhere and you also
might want to customize what you present for each region.

> Does nginx has the configuration for it to check the files locally and
> then
> forward the request to main content servers if requested file is not
> cached
> locally ?

There are many ways to do this with nginx and Lua but a independent cache
index would be much better, with it you can do much more like redirect a
content source from elsewhere depending on load and demand. You simply feed
nginx the cache index. A very simplistic cache index system is abusing a
local (local to nginx) dns server, assign local IP's to resources and change
them according to load and demand. Again for a local DNS you can assign
whatever you want to a dns name, with a local ttl of 15 seconds and nginx
loadbalancing between 4 regional resources it will be peanuts to change the
load based on demand (provided you have monitoring in place which can act on
such data). Basically a DIY BGP :)

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,249997,250002#msg-250002



More information about the nginx mailing list