Brief introduction
MongoDB is more like MySQL, support field index, cursor operation, the advantage is that the query is more powerful, good at querying JSON data, can store large amounts of data, but does not support transactions.
MySQL is significantly less efficient when it comes to large data volumes, and MongoDB is more of a substitute for relational databases. Memory management mechanism
The Redis data all exists in memory and is written to disk on a regular basis, and when memory is insufficient, the specified LRU algorithm can be selected to delete the data.
MongoDB data exists in memory, implemented by Linux system Mmap, when the memory is not enough, only the hotspot data into memory, the other data exists disk. Supported data Structures
Redis supports rich data structures, including hash, set, list, and so on.
MONGODB data structure is relatively single, but support rich data expression, index, most similar relational database, support query language is very rich. Performance
Both performance is relatively high, should say is not a bottleneck. Reliability
Both of them support persistence. Cluster
MongoDB clustering technology is relatively mature, Redis starting from 3.0 support cluster. Scenario Not applicable
Ø operations that require the use of complex SQL
Ø Transactional Systems