File access with Multiple Servers?

Dzwestwindsor

Solid State Member
Messages
7
Hello,

I'm currently in the process of building a site. It involves users uploading images. My current setup is that the images are saved on a filesystem, not a database. The only thing in the database is a URL that directs the user to the image stored on the filesystem, as well as Image description, etc.

Now, it's all good if I have one server. But what if I have 2 servers? or 3? If the images are being saved on a filesystem and not the database, then is it possible for the other servers to access images stored in the filesystem of multiple servers?

If i have the images stored to a database, then sure, multiple servers can access it. But what if the images are stored in the filesystem?

Can I store files on a filesystem if I am going to have multiple servers?

(The reason I am asking is because storing binary in databases hogs up a lot of the perfomance when users are retrieving and storing new images. It's a ton faster to store it on a filesystem. But then, what if I have multiple servers?)

Thanks in advance :)
 
Simply have the user upload to server A.
Then server A uploads to server B, or C.
If server A is down upload to server B, B uploads to server C and A when it comes up.
If server B is down, then have C upload to B and A when they come back up.
 
nofear1999, thank you for the reply.

Sure, that can be a solution for uploading the files. But what if I want to retrieve it? Is it possible to retrieve files stored on different server filesystems all at the same time? Can the user that's on Server A dynamically retrieve content stored on Server B? Then retrieve other content to render from server C?
 
use nfs,

setup correctly nfs (or nfs2) should replicate the files to all the servers automatically.

for retrieving the files use load balancing to spread the traffic over as many servers as you like.

(there are all free features and easy to configure in windows).

for Linux, it shouldn't be too difficult to make a script to replicate files from a primary server to a couple of secondary servers.

once again network load balancing to distribute the get traffic over the servers.
 
Back
Top Bottom