The difference between MongoDB and Redis

Source: Internet
Author: User

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

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.