It's very important to ensure that the database is eventually consistent. As we shall soon see, MongoDB delays all writes to the disk because the disk's I/O is slow. Write consistency means that every time something is written to the database, the delayed write should not cause inconsistency when we read back the data. MongoDB ensures this consistency for every write operation and the updated value is always returned back in the read operation. This is important for a couple of reasons:
Ensuring you always get the latest updated data
Easy and consistent crash recovery
MongoDB tries to be as efficient and fast as it can get. So, to cater to this, it uses memory-mapped files for storage. This is as fast as it can get with the disk I/O and system cache. As every operating system works with virtual memory, MongoDB leverages this and can effectively be as large as the virtual memory allows it...