Mongodb document size limit
As a MongoDB beginner When designing a database for large quantities of data Then I should be aware of the document size 16MB limit in BSON format
The Document limit size is 16MB unless you’re using GridFS (but it seems like if you can’t get GridFS from 3rd parties like MongoHQ or MongoLab?). Remember that MongoDB by default puts the working set of your database in RAM.
So if you expect to have millions of some things then you better put those things in a separate collection, even if semantically it may make more sense to embed them in another document. If you’re using mongoid that simply means having a standalone model referencing another model.
Useful discussions on Stack Overflow:
- Understanding MongoDB BSON document size limit
- How to determine a document’s size with Mongoid
- What’s a MongoDB working set
- Check out This blog to get to know GridFs
- Intro to bson on youtube
- Using gridfs