Skip to content
Related Articles

Related Articles

Improve Article
Difference between Redis and MongoDB
  • Last Updated : 30 Jun, 2020

1. Redis :
Redis stands for Remote Dictionary Server which is an in-memory data structure project implementing a distributed, in-memory key-value database with optional durability. Redis was developed by Redis labs and initially released on May 10, 2009. It is written in ANSI and C languages. Redis offers memory efficiency, fast operating speed, high availability and provides some features like tunability, replication, clustering, etc.

2. MongoDB :
MongoDB is a cross-platform document-oriented and a non relational (i.e. NoSQL) database program. It is an open-source document database, that stores the data in the form of key-value pairs. MongoDB is developed by MongoDB Inc. and initially released on 11 February 2009. It is written in C++, Go, JavaScript, Python languages. MongoDB offers high speed, high availability, and high scalability.

Difference between Redis and MongoDB :

1.It was developed by Redis labs and initially released on May 10, 2009.It was developed by MongoDB Inc. and initially released on 11 February, 2009.
2.Redis is written in ANSI and C languages.MongoDB is written in C++, Go, JavaScript and Python languages.
3.The primary database model for Redis is Key-Value Store.The primary database model for MongoDB is Document Store.
4.Redis supported data types are strings, hashes, lists, sets and sorted sets, bit arrays, hyperloglogs and geospatial indexes. Hence, have partial predefined data types.MongoDB supported data types are string, integer, double, decimal, boolean, date, object_id, geospatial. Hence, have predefined data types.
5.Redis supports secondary indexes with RediSearch module only.MongoDB supports secondary indexes without any restrictions.
6.The Server-side scripting in Redis is through Lua.The Server-side scripting in MongoDB is through JavaScript.
7.Redis supports both Master-Slave Replication and Master-Master Replication.MongoDB supports only Master-Slave Replication.
8.Redis does not support Map Reduce method.MongoDB supports Map Reduce method.
9.Server operating systems for Redis are BDS, Linux, OS X and Windows.Server operating systems for MongoDB are Solaris, Linux, OS X and Windows.
10.Some companies like Twinkl Educational Publishing, Merrill Corporation, Limited, Owler, Inc., etc use Redis.Some companies like Adobe, Amadeus, Lyft, ViaVarejo, Craftbase, etc use MongoDB.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.


My Personal Notes arrow_drop_up
Recommended Articles
Page :