开发者

Image storage location

开发者 https://www.devze.com 2023-02-11 22:36 出处:网络
What\'s the best place to store an image? In the database? or in the Filesystem? What if I have multiple s开发者_如何转开发ervers? Would filesystem storage still work?

What's the best place to store an image?

In the database? or in the Filesystem?

What if I have multiple s开发者_如何转开发ervers? Would filesystem storage still work?

Thank you


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消