I am designing a solution to store many large files. From what I have read on stackoverflow, database systems such as Mongodb are the best way to store a large number of files (source: Scalable File Storage). Why? Surely I would be better off simply storing the files in the file system on a scaleable system such as like Amazon and giving each file an ID.
To try to find an answer I have looked at:
- Image upload storage strategies
- MySQL Binary Storage using BLOB VS OS File System: large files, large quantities, large problems
- Large scale image storage
- Difference between Object Storage And File Storage
- Scalable File Storage
So far I appreciate that:
- Storing on the file system would make server migration a lot harder.
- There are limits as to the number of files and folders that can be kept in a directory.
Neither of these two points seems to convince me that it is worth the extra work of programming files to be kept in a database. It also feels to me that it would increase the risk of a catastrophic corruption of the database if I store large files in it rather than storing directly in the file system. I am currently thinking of storing the files in an Amazon s3 solution is this. Can you please let me know if am crazy and/or if I have overlooked anything?