3 ms·
I used MongoDB in production. About 6 years ago, I have bad experience with it and abandon it. In a new job recently, I picked up it again and to my surprise,
by kureikain 9y ago
I used MongoDB in production. About 6 years ago, I have bad experience with it and abandon it.
In a new job recently, I picked up it again and to my surprise, it performs super well and have lots of new concepts.
1. TTL index: the data automatically remove after a certain time
2. Hidden Replica: we can do whatever on this node without slow down producion
3. Very easy to use oplog: It's super easy to get access to oplog, just as you work with a normal collection
4. Aggregation Framework is awesome: It's tedious to write at first, however, it become very clear with the pipeline design
5. JOIN: I'm suprising when I discover this. But it does have a similar concept to join now with `$lookup`
6. Very low storage: If you used MongoDB as a log/timeseries database/event you will appreciate WiredTiger
7. Metric exposing is awesome: Lots of userful metrics
8. The cluster is much easier to manage nowsaday and very stable: adding a new node is just a matter of booting up server and evrything handle automatically. Think of MySQL, where you have to export data, get the position of bin log and file name to config the slave.
One thing remains same is we still have to deal with migration and back fill data.
Careful planning and design the database are still requirement, not just dump whatever you want to it.