When comparing MongoDB vs RethinkDB, the Slant community recommends RethinkDB for most people. In the question“What are the best databases to use for Node.js applications?” RethinkDB is ranked 2nd while MongoDB is ranked 5th. The most important reason people chose RethinkDB is:
Only takes about 30 seconds to install. They also have a docker file for running it on AWS, Google Cloud or your own.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Great speed
MongoDB queries can be very fast because the data is usually all in one place and can easily be retrieved in a single lookup. But this is true only when the data is truly a document. When it's trying to emulate a relational model it starts to become really slow because it may have to perform many independent queries to retrieve a single document.
Pro Perfect documentation and tutorials
Miles above other databases in educational resources.
Pro Uses JSON
As Node.js uses JavaScript there's no need to map the returned JSON data from MongoDB, as JavaScript is a superset of JSON. Essentially solving object-relational impedance mismatch by its very nature. Working with JSON is also easier overall as it more easily fits into how you would represent data on the client.
Pro Doesn't require a unified data structure
Mongo is very flexible in that it doesn't require a unified data structure across all objects. So it's rather easy to use.
Pro Easy to scale
MongoDB has powerful sharding and scaling capabilities for when the data stored in the database gets so large that a single machine may not be able to store all of it. Sharding solves this problem through horizontal scaling. Mongo gives developers the ability to easily and painlessly add or remove as many machines as needed.
Pro Easy install
Only takes about 30 seconds to install. They also have a docker file for running it on AWS, Google Cloud or your own.
Pro Changefeeds (change listeners)
You can listen to changes and trigger code based on these changes.
Pro Powerful query language
RethinkDB's ReQL is a very powerful functional query language. The functional aspects of ReQL and the straightforward implementation of the Node driver for Rethinkdb make it a natural fit for Javascript developers. You no longer have to type some obscure syntax in quotes (aka SQL), your queries are just "natural" Javascript functions in the same way you would use lodash to handle your collections.
Pro Auto master promotion
Unlike a lot of other databases where if the master is down the system is down, this one if the master is down someone else is made master so much more peer to peer.
Pro CLI and web administration tools
RethinkDB has administration tools in both CLI and GUI (web app). You can view whats going on right away by going to localhost:8080. The data explorer allows you to run queries on the db.
Pro Horizontal scalability
RethinkDB is scalable horizontally. It has support for sharding, parallel queries and MVCC concurrency.
Pro Ease of cluster setup
You can directly tell it to shard/replicate and how many shards/replicas depending on the amount of nodes. Each node doesn't need anything except one other node's ip/port in the cluster to join and maybe the auth.
Cons
Con Reported to lose or corrupt data
MongoDB is famously known for leaking and losing data over time.
Con Document Stores may be not suited for relational data
MongoDB has no JOIN, all relations are supposed to be resolved client-size which entails additional requests to the server.
Con Need many search features
Though it is possible to index and search text in documents in MongoDB 4.0 in multiple languages. The indexing and search is not as powerful as for example Elastic Search. For instance not being able to search for only parts of words.
Con Cannot run queries from its CLI
Con No user accounts
This is just the database, you need to setup your own auth and user accounts (such as using Auth0).