In MongoDB, GridFS is a special specification for storing and retrieving files which exceed the BSON-document size limit (16MB). The major functionality of this grid is to divide a file into smaller segments, and stores each of those segments as a separate document instead of storing then into a single document.