static file cluster
Liang Jin
mywebadmin at gmail.com
Tue May 8 22:40:42 MSD 2007
Hi,
I am exploring the opportunities using nginx. Here is the use case:
Backend server has many static files that need to be delivered to clients fast.
Frontend has many smaller servers each with nginx installed. The
incoming traffic can be load-balanced or round-robin balanced to the
frontend nginx cluster.
Each node will try to serve the file from its local file cache. If it
cannot find the cache locally, it will need to contact the other
frontend peers first to check whether they have the files cached. If
yes, redirect the client. If not, it will have to fetch the files from
the backend server and cache the file locally.
Anyway, if there is only one frontend caching server, the following should work:
location / {
root /var/www/cache;
index index.html;
error_page 404 = /miss;
}
location = /miss {
proxy_pass http://backend;
}
The problem is that I will need to find a caching solution that will
store the file in the local cache folder after serving the contents.
Secondly, I will need a way to talk to the peers if I have more
frontend caching servers.
Would it be worthwhile to pursue such a route? Or I should just use Squid.
-Liang
More information about the nginx
mailing list