Redis VS MongoDB

Compare Redis vs MongoDB and see what are their differences.

Redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps. (by redis)

MongoDB

The MongoDB Database (by mongodb)
Our great sponsors
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
Redis MongoDB
108 89
52,760 21,027
1.4% 1.3%
9.8 10.0
7 days ago 2 days ago
C C++
BSD 3-clause "New" or "Revised" License GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Redis

Posts with mentions or reviews of Redis. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-16.
  • Running Redis in a Docker container
    2 projects | dev.to | 16 Jan 2022
    Redis stands for REmote DIctionary Server. It is an open source, fast NoSQL database written in ANSI C and optimized for speed. Redis is an in-memory database that means that all data in Redis is stored in RAM, delivering the fastest possible access times to the data for both read and write requests.
  • Who needs cash
    1 project | reddit.com/r/pcmasterrace | 15 Jan 2022
    Here, have some cache
  • Deploy Redis as a Docker container [part 1]
    1 project | dev.to | 14 Jan 2022
    Redis is an in-memory key-value store which can save abstract data structures with high performance. The open-source software is typically used for database, messaging, and caching functions.
  • Cache Master data in Redis using Python
    2 projects | dev.to | 12 Jan 2022
    According to its GitHub repository, Redis (stands for REmote DIctionary Server) is an in-memory data structure store. It is a disk-persistent key-value database with support for multiple data structures such as strings, hashes, lists, sets, bitmaps, etc.
    2 projects | dev.to | 12 Jan 2022
    Redis offers highly performant and efficient read and write along with few operations mentioned in this article. There are lots more. For more information, you can visit the documentation.
  • What is the best key-value store for Rust 2021
    6 projects | reddit.com/r/rust | 11 Jan 2022
    If you need distributed access then redis
  • How to start a headless E2E e-commerce store in no time with Medusa 🛍️
    4 projects | dev.to | 10 Jan 2022
    Redis is another database commonly used for caching. You can download it from here.
  • Thoughts on refresh token/revoke all workflow
    1 project | reddit.com/r/node | 7 Jan 2022
    import { ClientOpts, RedisClient } from "redis"; // TODO: When (if ever) redis supports expiration of hash entries we should remove this prefix and use a hash instead. (See https://github.com/redis/redis/issues/167) const KEY_PREFIX = "SESSION_BLACKLIST:"; const redisOptions: ClientOpts = { host: process.env.REDIS_HOST, // password: process.env.REDIS_PASSWORD, port: (process.env.REDIS_PORT && parseInt(process.env.REDIS_PORT)) || 6379, }; class TokenBlacklist { private readonly client: RedisClient; constructor() { this.client = new RedisClient(redisOptions); } public add(sessionId: string, expiresIn: number): Promise { return new Promise((resolve, reject) => { this.client.setex( KEY_PREFIX + sessionId, expiresIn + (2 * 60 * 1000), // Add 2 minute buffer "", (error: Error | null) => { if (error) { return reject(error); } resolve(); } ); }); } public check(sessionId: string): Promise { return new Promise((resolve, reject) => { this.client.exists( KEY_PREFIX + sessionId, (error: Error | null, exists: number) => { if (error) { return reject(error); } return resolve(exists === 1); } ); }); } public close(): Promise { return new Promise((resolve, reject) => { this.client.quit((error: Error | null) => { if (error) { return reject(error); } return resolve(); }); }); } }
  • Help with databases
    1 project | reddit.com/r/javahelp | 7 Jan 2022
    If you're looking to save data like a hashmap, look into redis, although this is only an in-memory DB, if I remember correctly. You can try using it in combination with H2, which someone else already mentioned.
  • Improving performance with SQL aggregate functions
    4 projects | dev.to | 4 Jan 2022
    We developed the backend in Kotlin with the Spring Boot 2.5.3 framework and the Hibernate 5.4.32.Final ORM (Object Relational Mapping). We deployed it on an 8GB 4 CPU VPS through a Docker container managed by Dokku. The initial heap size was set to 2GB and limited to 7GB, while we allocated the remaining GB of RAM to a Redis-based caching system. We built the web application with performance in mind. Specifically, it's based on the multi-layered Spring Boot architecture described here and involves multi-thread processing. ​

MongoDB

Posts with mentions or reviews of MongoDB. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-13.
  • MongoDB Atlas Hackathon: S/F E-Commerce Creation
    2 projects | dev.to | 13 Jan 2022
    MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era. This example will show you how to connect to and use MongoDB as your backend for your Next.js app.
  • Krishi Bazaar
    5 projects | dev.to | 13 Jan 2022
    MongoDb Atlas - Used as the application database (Have always been a fan of Json based databases. And its cloud!)
  • API for Google Developer Student Club at my Campus
    4 projects | dev.to | 9 Jan 2022
    MongoDB Databse (Local/Remote)
  • Keto Diet Lib - a collection of food info and helpful tools for ketogenic patients
    2 projects | dev.to | 9 Jan 2022
    To use Keto Diet Lib, you will need python 3.9. You will also need a MongoDB account and the MongoDB Community Edition application.
  • Billie | The Most Best Way to Create a Professional Invoice
    5 projects | dev.to | 8 Jan 2022
    Mongodb - MongoDB is a source-available cross-platform document-oriented database program.
  • DEV Book store
    9 projects | dev.to | 7 Jan 2022
    MongoDB
  • Building a CRUD API with Node.js and MongoDB
    4 projects | dev.to | 7 Jan 2022
    Howdy everyone, in this article we are going to build a CRUD (Create, Read, Update, Delete) API with Node.js and MongoDB. This API will be able to add, get, edit and delete todos!
  • Forecast Sales for the Next Two Years
    3 projects | dev.to | 5 Jan 2022
    MongoDB: We preferred to use MongoDB in our program because of its flexibility, speed, power and compatibility with Java.
  • Build a REST API with Golang and MongoDB - Fiber Version
    7 projects | dev.to | 2 Jan 2022
    This post will discuss building a user management application with Golang using the Fiber framework and MongoDB. At the end of this tutorial, we will learn how to structure a Fiber application, build a REST API and persist our data using MongoDB.
  • Refactored Waffles
    3 projects | dev.to | 27 Dec 2021
    Hosted at refactoredwaffles.pranjaljain.me For this project I used Next.js & MongoDB, here both the tools I have used gives a preference to performance, And have made the web application super fast and powerful. In this project I have created Front end using HTML/CSS Components & Backend using JS which can be found in the pages/api directory in the GitHub repo of the application. All the keys were passed as environment variables and the application was deployed on Vercel using the same environment variables.

What are some alternatives?

When comparing Redis and MongoDB you can also consider the following projects:

LiteDB - LiteDB - A .NET NoSQL Document Store in a single data file - https://www.litedb.org

RabbitMQ - Open source RabbitMQ: core server and tier 1 (built-in) plugins

LevelDB - LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

Marten - .NET Transactional Document DB and Event Store on PostgreSQL

ArangoDB - 🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.

Apache Ignite - Apache Ignite

celery - Distributed Task Queue (development branch)

Riak - Riak is a decentralized datastore from Basho Technologies.

RavenDB - ACID Document Database

RethinkDB - The open-source database for the realtime web.

SqlKata Query Builder - SQL query builder, written in c#, helps you build complex queries easily, supports SqlServer, MySql, PostgreSql, Oracle, Sqlite and Firebird