The difference between MongoDB and Redis

Source: Internet
Author: User
Tags data structures mongodb redis
Brief introduction

MongoDB is more like MySQL, Support for field indexing, cursor operations, the advantage is that the query function 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 amounts of data, and MongoDB more time as an alternative to relational databases. Memory management mechanism

Redis data is all in memory, periodically written to disk, and when there is not enough memory, you can select the specified LRU algorithm to delete the data.

MongoDB data exists in memory, implemented by Linux system Mmap, when there is not enough memory, only the hotspot data is put into memory and the other data is on disk. Supported data Structures

Redis supports a wealth of 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, it should be said that will not be a bottleneck. Reliability

Both support persistence. Cluster

MongoDB cluster technology is relatively mature, redis from 3.0 to support the cluster. Scenario Not applicable

Ø need to use complex SQL operations

Ø 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.