The difference between MongoDB and Redis

Source: Internet
Author: User
Tags data structures mongodb redis
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.