On 8/22/06, Rob Kinyon <[EMAIL PROTECTED]> wrote:
On 8/18/06, Robert Hicks <[EMAIL PROTECTED]> wrote:
> Sam Tregar wrote:
> > On Thu, 17 Aug 2006, Mark Stosberg wrote:
> >
> >> - Storing photos in PostgreSQL for easy deployment on load-balanced
> >> web servers. (So far, that's worked surprising well)
> >
> > That is surprising! Why would you do that instead of using NFS?
> >
>
> I am curious about that as well...
I've never understood this fascination with storing files instead of a
DB instead of storing filenames and keeping the actual files on a NFS
or NAS. It just seems so ... wasteful.
I have never done it myself either, but there are pros and cons to
every solution. I can see the benefits of keeping files in the DB,
since it keeps all of your data in one location (and uploaded image
files are really just data to your applicaton). It makes backing up
the data easier, and it makes redundancy easier by just replicating
your database.
However, performance wise it is not such a great idea. And it would
also be a pain to do any batch processing of the files, or manipulate
the files in any way. You are really limited to accessing these files
through your application, which is not always ideal.
Note that there are also cons to usng NFS. File locking is a bit more
of a hasle over NFS, and redundancy is as well (why have redundancy in
your front end web servers if your NFS server can take everything down
at once). And if you have multiple NFS servers, then you have
syncronization issues (and at that stage why not syncronize the data
directly to your front end servers).
So as with everything, I think it really depends on your situation to
figure out what is best for you.
Cheers,
Cees
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]