MongoDB vs Redis
MongoDB is a document database that stores data on disk. Redis is an in-memory data store, often used as a cache in front of another database. This comparison sets them side by side on six aspects and says which fits which job.
The two overlap more than they used to. Redis 8 added JSON documents, a query engine and vector sets to the open-source release. MongoDB added search and vector search to its free Community Edition. A common design runs both: MongoDB holds the records, and Redis keeps a copy of the hot ones in memory.
Prices and other facts are as of October 29, 2026. Vendors change prices; confirm them on the vendor’s own pricing page. Independent analysis: neither project nor any vendor named here paid for or reviewed this page.
Who makes each
MongoDB, Inc. develops MongoDB and sells Atlas, its managed service. The company is listed on Nasdaq as MDB.
Salvatore Sanfilippo created Redis in 2009. The company Redis Labs renamed itself Redis in August 2021. It sells Redis Cloud and Redis Software, and lists its headquarters as San Francisco.
After the 2024 license change, the Linux Foundation launched Valkey, which continues from Redis 7.2.4 under the BSD 3-clause license. AWS, Google Cloud and Oracle are among its backers.
How they compare
Compared as of the MongoDB 8 and Redis 8 release series, with list prices as of October 2026.
| Aspect | MongoDB | Redis | What it means |
|---|---|---|---|
| Primary role | A document database. Data lives on disk in the WiredTiger storage engine, with a journal and checkpoints every 60 seconds. | An in-memory data store. Redis keeps the whole data set in memory, so a data set cannot be larger than memory. It is commonly used as a cache, and can evict keys when it reaches a memory limit. | MongoDB is built to hold the records; Redis is built to serve them fast. |
| Data model | BSON documents in collections, with nested documents and arrays. The maximum document size is 16 mebibytes. | Keys holding native data types: strings, hashes, lists, sets, sorted sets, streams, geospatial indexes, JSON, time series, probabilistic types and vector sets. | MongoDB models whole records; Redis models the data structure the application works on. |
| Persistence | Writes are journaled before checkpoints. After a crash, MongoDB replays the journal from the last checkpoint. | RDB snapshots, an append-only file (AOF), both, or none. RDB alone can lose the minutes since the last snapshot. AOF with the default fsync every second can lose 1 second of writes. | Redis can be durable, but you choose and configure the trade-off. |
| Querying and search | The query API, aggregation pipeline and secondary indexes. MongoDB Search and Vector Search run in Atlas and, since June 2026, as a generally available feature of Community Edition through a separate mongot process. | Commands by key. Redis Search adds secondary indexes on hashes and JSON, full-text, geospatial and vector search, and aggregations. Vector sets, added in Redis 8, store vectors and query them by similarity. | Both can serve AI retrieval; MongoDB queries data on disk, Redis queries data held in memory. |
| License | Community Server is under the Server Side Public License (SSPL) for versions released on or after October 16, 2018. The Open Source Initiative has not approved the SSPL. | Redis 7.2 and earlier are under BSD-3-Clause. Redis 7.4 is under RSALv2 or SSPLv1, after a March 2024 change. From Redis 8, users can also choose AGPLv3, an OSI-approved license. | Check the license with legal if you offer either as a service; Redis 8 gives you an OSI-approved option. |
| Managed service and list price | Atlas runs on AWS, Azure and Google Cloud. Free: $0 for 512 MB of storage. Flex: from $8 to $30 per month. Dedicated: from $0.08 per hour for M10, with 2 GB of RAM. US list price as of October 2026. | Redis Cloud runs on AWS, Google Cloud and Azure. Free: $0 for 30 MB. Essentials: from $5 per month. Pro: from $0.014 per hour, with a $200 monthly minimum. US list price as of October 2026. | Redis Cloud plans are sized by memory and Atlas tiers by storage and RAM, so price the same data set on both. |
The quick read
Choose MongoDB when
- the data set is larger than the memory you want to pay for
- the database is the system of record and must not lose committed writes
- writes must change several records together or not at all
Choose Redis when
- you need a cache, session store, rate limiter or queue
- the working set fits in memory and response time matters most
- your data maps to lists, sets, sorted sets, streams or counters
Matching each to a workload
Caching database reads for a web application
Redis. Set a memory limit and an eviction policy such as allkeys-lru, and keep the source data in your main database.
A product catalog or customer profiles
MongoDB. Each record is a document with the fields it needs, and the data set can grow past memory.
Sessions, leaderboards and rate limits
Redis. Keys can expire, and sorted sets and counters update in one command.
Semantic search over application data
Either. MongoDB Vector Search keeps embeddings in the same documents as the data. Redis serves vector queries from memory. Test both on your data.
Can Redis be the only database?
Sometimes. Redis Search lets Redis act as a document database. The open-source release keeps the whole data set in memory, and transactions run all queued commands without rollback. If losing 1 second of writes or paying for memory at full data size is a problem, keep the records in a disk-based database and cache the hot data in Redis.
Common questions
Is Redis open source again?
From Redis 8, Redis Open Source can be used under AGPLv3, which the OSI approves. RSALv2 and SSPLv1 remain options. Redis 7.4 is under RSALv2 or SSPLv1 only.
Does Redis support transactions?
Yes. MULTI and EXEC run a group of commands in order with no other client in between. Redis does not roll back: if one command fails, the others still run. MongoDB supports multi-document ACID transactions on replica sets and sharded clusters.
How does each scale across servers?
MongoDB shards collections across replica sets, with mongos routers and config servers. Redis Cluster splits keys across 16,384 hash slots; a multi-key command works only when all keys are in the same slot.
Sources
- MongoDB SSPL FAQ
- MongoDB documents
- MongoDB WiredTiger storage engine
- MongoDB transactions
- MongoDB sharding
- MongoDB Vector Search overview
- Now GA: MongoDB Search and Vector Search for Community Edition
- MongoDB Atlas
- MongoDB pricing
- MongoDB, Inc. second quarter fiscal 2027 results
- Redis licenses
- Redis is now available under the AGPLv3 open source license
- Redis FAQ
- Redis data types
- Redis vector sets
- Redis persistence
- Redis key eviction
- Redis transactions
- Redis Search
- Scale with Redis Cluster
- Redis Cloud quick start
- Redis pricing
- Redis company
- Redis Labs becomes, simply, Redis
- Redis hits 10 billion Docker pulls
- Linux Foundation launches open source Valkey community