Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I want the benefits of GridFS but mainly storing files under 16MB

I need to create a storage system for files that will mostly be under 16MB but I want the benefits of GridFS like versioning, custom metadata, easy backup (with mongodump), etc. I'd say maybe 10% of my files would be over 16MB so I can't rely on storing in single documents, and I don't want to recreate the API for the benefits I'm looking for. I'm also already using a mongoDB system.

Should I use GridFS?

like image 677
Josh Kim Avatar asked Jan 17 '13 04:01

Josh Kim


1 Answers

Without further details, I'd start by suggesting you read the recommendations provided here.

Given that all of your documents won't fit within the maximum document size when stored as a BSON document as BinData, I'd recommend using the gridFS system for a consistent programming and data management experience (for developers and IT). Depending on how the files are consumed, you may be able to more efficiently stream the contents of the files to clients when they are stored in GridFS by reading and writing in chunks.

like image 196
WiredPrairie Avatar answered Sep 19 '22 10:09

WiredPrairie