Recently, due to project requirements, MongoDB is used to store data. Frankly speaking, it is quite disappointing. Of course, the reason why I am not familiar with MongoDB is not ruled out. But in general, MongoDB still has a long way to go if you want to enjoy it and accept it.
Briefly introduce the problems encountered:
1. memory consumption. It seems that many people have complained about this. Because MongoDB uses the memory ing file to store data, it especially eats memory. What's even more depressing is that there is no way to control it. If MongoDB runs on a dedicated machine, the memory can be fully occupied. If MongoDB runs on the same machine as other services ....
2. Very hard drive. This is especially hard to understand. 20 GB of data may occupy 60 GB of hard disk space. Note that this is not the space required by a single replica. I really don't understand why I need so much extra space, even if the hard disk is cheap ....
3. Weird data loss. When I tested MongoDB performance on the test machine, I accidentally filled the hard disk and wrote data to MongoDB. This was a strange scene, the number of records of MongoDB data is decreasing... the cause is unknown. Even if the hard disk is full, no data will be added at most. It makes no sense to reduce it...
In summary, many of the benefits of nosql are exaggerated. If you want to use it, do more tests in advance.