Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Mongoose
Mongoose

788
599
+ 1
38
Redis
Redis

14.7K
9.8K
+ 1
3.8K
Add tool

Mongoose vs Redis: What are the differences?

What is Mongoose? MongoDB object modeling designed to work in an asynchronous environment. Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.

What is Redis? An in-memory database that persists on disk. Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

Mongoose belongs to "Object Document Mapper (ODM)" category of the tech stack, while Redis can be primarily classified under "In-Memory Databases".

"Well documented" is the primary reason why developers consider Mongoose over the competitors, whereas "Performance" was stated as the key factor in picking Redis.

Mongoose and Redis are both open source tools. Redis with 37.1K GitHub stars and 14.3K forks on GitHub appears to be more popular than Mongoose with 18.8K GitHub stars and 2.62K GitHub forks.

Airbnb, Uber Technologies, and Instagram are some of the popular companies that use Redis, whereas Mongoose is used by Startuptabs, TripTips, and WebbyLab. Redis has a broader approval, being mentioned in 3239 company stacks & 1735 developers stacks; compared to Mongoose, which is listed in 85 company stacks and 88 developer stacks.

What is Mongoose?

Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.

What is Redis?

Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Why do developers choose Mongoose?
Why do developers choose Redis?

Sign up to add, upvote and see more prosMake informed product decisions

What companies use Mongoose?
What companies use Redis?

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Mongoose?
What tools integrate with Redis?

Sign up to get full access to all the tool integrationsMake informed product decisions

What are some alternatives to Mongoose and Redis?
MongoDB
MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
Anaconda
A free and open-source distribution of the Python and R programming languages for scientific computing, that aims to simplify package management and deployment. Package versions are managed by the package management system conda.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
Mongoid
The philosophy of Mongoid is to provide a familiar API to Ruby developers who have been using Active Record or Data Mapper, while leveraging the power of MongoDB's schemaless and performant document-based design, dynamic queries, and atomic modifier operations.
See all alternatives
Decisions about Mongoose and Redis
Django
Django
Redis
Redis

I use Redis because, based on the case studies I have reviewed, it appears to be the most performant cache database for my Django projects. The ease of configuration and deployment is also a big plus.

Using both higher level view caching as well as low-level QuerySet caching with Redis has allowed me to improve HTTP request times by an order of magnitude.

See more
Interest over time
Reviews of Mongoose and Redis
Review ofMongooseMongoose

I inherited a stack where Mongoose is used in the database layer.

It's been several months and it's still the single highest source of daily WT*s in my backend development. The API is full of irregularities and the design is a poor mix of object-orientation and stateful objects with a lot implicit behavior. Mongoose made the choices of taking the worst parts of ORMs and using them in a context where the benefits of ORMs don't apply. The only reason I'm keeping it is its handy .populate() feature. Expect bad surprises!

Review ofRedisRedis

Redis is a good caching tool for a cluster, but our application had performance issues while using Aws Elasticache Redis since some page had 3000 cache hits per a page load and Redis just couldn't quickly process them all in once + latency and object deseialization time - page load took 8-9 seconds. We create a custom hybrid caching based on Redis and EhCache which worked great for our goals. Check it out on github, it's called HybriCache - https://github.com/batir-akhmerov/hybricache.

How developers use Mongoose and Redis
Avatar of Cloudcraft
Cloudcraft uses RedisRedis

Redis is used for storing all ephemeral (that's data you don't necessarily want to store permanently) user data, such as mapping of session IDs (stored in cookies) to current session variables at Cloudcraft.co. The many datastructures supported by Redis also makes it an excellent caching and realtime statistics layer. It doesn't hurt that the author, Antirez, is the nicest guy ever! These days, I would be really hard pressed to find any situation where I would pick something like Memcached over Redis.

Avatar of Trello
Trello uses RedisRedis

Trello uses Redis for ephemeral data that needs to be shared between server processes but not persisted to disk. Things like the activity level of a session or a temporary OpenID key are stored in Redis, and the application is built to recover gracefully if any of these (or all of them) are lost. We run with allkeys-lru enabled and about five times as much space as its actual working set needs, so Redis automatically discards data that hasn’t been accessed lately, and reconstructs it when necessary.

Avatar of Stack Exchange
Stack Exchange uses RedisRedis

The UI has message inbox that is sent a message when you get a new badge, receive a message, significant event, etc. Done using WebSockets and is powered by redis. Redis has 2 slaves, SQL has 2 replicas, tag engine has 3 nodes, elastic has 3 nodes - any other service has high availability as well (and exists in both data centers).

Avatar of Brandon Adams
Brandon Adams uses RedisRedis

Redis makes certain operations very easy. When I need a high-availability store, I typically look elsewhere, but for rapid development with the ability to land on your feet in prod, Redis is great. The available data types make it easy to build non-trivial indexes that would require complex queries in postgres.

Avatar of Kent Steiner
Kent Steiner uses RedisRedis

I use Redis for cacheing, data storage, mining and augmentation, proprietary distributed event system for disparate apps and services to talk to each other, and more. Redis has some very useful native data types for tracking, slicing and dicing information.

Avatar of AyeDeals
AyeDeals uses MongooseMongoose

We use mongoose and node-native for database querying.

Avatar of anthillsolutions
anthillsolutions uses MongooseMongoose

No-brainer for accessing Objects with NodeJS.

How much does Mongoose cost?
How much does Redis cost?
Pricing unavailable
Pricing unavailable