|
|
|
|
|
by bonn1
4131 days ago
|
|
Good point and I just checked: rdb seems to be for SQL based DBs. But I am wondering who is using SQL based DBs with Node, feels ancient to me, except you build the next datastore for a bank but even then. Also Postgres with its JSON options does not give the feeling, flexibility and speed as Node/Mongo. I could imagine that the larger part of Node users are working with Mongo, or not? |
|
Once you start to really scale, you'll start to find a couple parts of MongoDB break-down:
1. MongoDB has no concept of transactions and is not ACID compliant. These short-comings seem innocuous enough at first, but you end up with some crazy potential race conditions that you just end up praying you never face.
2. Distributed MongoDB layers are difficult to implement as well as maintain.
3. MongoDB Replica sets are unpredictable and unreliable in the speed at which they are able to stay up to date and require changes to your code to fully utilize (since you need to ensure you are always reading from a replica when you can, but only ever writing to the master MongoDB instance)
4. At scale, MongoDB will consistently perform worse than Postgres for CRUD-based operations
5. Do you have true relations between documents? Do you ever use Mongoose's convenient `populate()` functionality? If so, you are now making multiple db queries in series when trying to fetch a document(s) from a single collection. This starts to really hurt your query times once you get enough documents/relations in your mongo collections.
I'm sure I'm missing some, but these are some of the areas where MongoDB has fallen down for me in the past.