views:

17

answers:

1

I'm planning to use multiple file servers to host my website uploaded files. what's the best way to do it ? should I install a web server on other machines as well? or is there any special software for routing files on the network? what would you pros do?

Thanks, Taher.

A: 

Here's one way you could do it...

Create a central routing handler specifically for grabbing files off the network and have your file servers named as sub domains pointing to your various file servers.

When a user clicks on the download link, e.g.

www.example.com/GetDownload.php?id=10

...the GetDownload.php page would look in the database to see where the file has been stored (assuming you're keeping track of the files locations in the database) or through whatever your convention is for keeping track of uploads, then determine the location of the file on your network. Then it could simply redirect the URL to the appropriate server/download folder. So GetDownload.php?id=10, upon finding the location of the file would redirect to the appropriate Server/URL:

AFile.doc is on FileServerB, redirect...

FileServerA.Example.com

Here! --> FileServerB.Example.com/A/AFile.doc

FileServerC.Example.com

George