Phil Snyder
Phil Snyder

Reputation: 11

Image storage location

What's the best place to store an image?

In the database? or in the Filesystem?

What if I have multiple servers? Would filesystem storage still work?

Thank you

Upvotes: 1

Views: 696

Answers (2)

baobee
baobee

Reputation: 451

Definitely you should store images in the filesystem or your database become huge.

Also you can use NFS (http://nfs.sourceforge.net/) to make images storage on one server and use "share" directory.

Or you can use rsync for syncing you images content on different servers.

Upvotes: 0

Nikita Rybak
Nikita Rybak

Reputation: 68006

This question has been answered many times before, e.g. here.

I'll add from myself that, since that time (2 years ago) I've come to trust external storage services, like Amazon S3. They are fairly cheap, provide most benefits of filesystem storage and also scale well.

Upvotes: 1

Related Questions