I need somebody to setup a PULL script from my video (flv format) storage server. After you set it up, you need to instruct me on how to set it up myself on other servers.
This pull script will be installed on an edge server and will do the following:
1. When a client request a flv file call [url removed, login to view] to this edge server, says [url removed, login to view] (port 81 as I use lighttpd to serve files), the script will check if the edge server has this file. If it has, then it will be served to the client.
If it does not have that file, then redirect the request to the storage server, so the client will get the file from the storage server. Meanwhile, the script will fetch that [url removed, login to view] from the storage to this edge server, and store in the location /home/www/flvs
Now if the second client request this [url removed, login to view], it will check again if the edge server has it or not. This time the edge already has the [url removed, login to view] file, so the file will be served from this edge server.
2. Setup a delete script and add to cronjob. This delete script will check the diskspace. If the diskspace is more than 80% full, it will delete the least used flv files (or oldest flv files). It can delete until the diskspace is 60% full...
Remember after you set up this script, please show me how to use this script to another server, so I can add it to the other server that I have.