In order to ensure that all modifications to a MongoDB data set are durably written to disk, MongoDB, by default, records all modifications to an on-disk journal. MongoDB writes more frequently to the journal than it writes the data files. The journal allows
MongoDB to successfully recover data from data files after a mongod instance exits without flushing all changes.
See Journaling for more information about the journal in MongoDB.
在 3.2 版更改: Starting in MongoDB 3.2, config servers for sharded clusters can be deployed as a replica set. The replica set config servers must run the WiredTiger storage engine. MongoDB 3.2 deprecates the use of three mirrored mongod instances for config servers.
If each application server has its own mongos instance, other application servers can continue to access the database. Furthermore, mongos instances do not maintain persistent state, and they can restart and become unavailable without losing any state or data.
When a mongos instance starts, it retrieves a copy of the config database and can begin routing queries.
MMAPv1
In the default configuration for the MMAPv1 storage engine, MongoDB writes to the data files on disk every 60 seconds and writes to the journal files roughly every 100 milliseconds.
什么时候我应该使用GridFS?
For documents in a MongoDB collection, you should always use GridFS for storing files larger than 16 MB.