Introduction
MongoDB is closer to relational database, support field index, cursor operation, the advantage is that the query function is very powerful, good at querying JSON data, can store massive data, but does not support transaction
MySQL is significantly less efficient when data is large, so MongoDB is more of a substitute for relational databases
Memory management mechanism
Redis data is stored in memory and is written to disk on a regular basis, and when memory is insufficient, the data is deleted using the selected LRU algorithm.
MongoDB data is stored in memory, implemented by Linux system map, when memory is not enough, only hot data is put into memory, other data storage disk
Supported data structures
Redis supports a rich data structure with list,set,hash,string, Sorted-set (ordered collection) total five species
MongoDB supports a single data structure, but supports rich data representations, indexes, most similar relational databases, and supports a very rich query language.
Performance
They don't have much performance, they're higher.
Reliability
Both of which support persistence
Cluster
MongoDB cluster technology is relatively mature, Redis is 3.0 before starting to support the cluster
The difference between MongoDB and Redis