RedisJSON vs MongoDB vs ElasticSearch: Benchmark Shows RedisJSON Dominates Performance
A comprehensive AWS benchmark reveals that RedisJSON dramatically outperforms MongoDB and ElasticSearch across isolated writes, isolated reads, mixed workloads, ops‑per‑second, and latency, maintaining sub‑millisecond response even under high update rates, while the other databases suffer significant slowdowns.
Redis official site provides a performance test report for RedisJSON (RedisSearch) that shows it outperforms other NoSQL solutions.
For isolated writes, RedisJSON is 5.4× faster than MongoDB and over 200× faster than ElasticSearch. For isolated reads, RedisJSON is 12.7× faster than MongoDB and over 500× faster than ElasticSearch.
In mixed‑workload scenarios, real‑time updates do not affect RedisJSON’s search and read performance, whereas ElasticSearch’s performance degrades.
RedisJSON supports about 50× higher operations per second than MongoDB and 7× higher than ElasticSearch; its latency is roughly 90× lower than MongoDB and 23.7× lower than ElasticSearch.
The benchmark ran on Amazon Web Services m5d.8xlarge instances, using a four‑VM setup (one client and three database servers) with identical hardware and networking conditions.
MongoDB 5.0.3 was deployed as a three‑member replica set with a text index for string fields. ElasticSearch 7.15 used a 15‑shard configuration with query caching and RAID‑0 local SSDs. RedisJSON 2.0 (RediSearch 2.2) ran on an OSS Redis Cluster 6.2.6 with 27 shards evenly distributed across three nodes.
Test Process
Infrastructure
All three solutions were evaluated on the same m5d.8xlarge VMs with local SSDs, ensuring low‑latency, stable network performance.
100% Write Benchmark
RedisJSON’s ingestion speed was 8.8× faster than ElasticSearch and 1.8× faster than MongoDB, while maintaining sub‑millisecond latency; 99% of Redis requests completed within 1.5 ms.
RedisJSON is the only solution that automatically updates its index on each write, providing immediate searchability, unlike ElasticSearch’s near‑real‑time refresh mechanism.
Combined latency and throughput improvements make RedisJSON 5.4× faster than MongoDB and over 200× faster than ElasticSearch for isolated writes.
100% Read Benchmark
RedisJSON allowed 15.8× more reads than ElasticSearch and 2.8× more than MongoDB, while keeping sub‑millisecond latency across the entire latency range.
RedisJSON is 12.7× faster than MongoDB and over 500× faster than ElasticSearch for isolated reads.
Mixed Read/Write/Search Benchmark
A mixed workload (65% search, 35% read, 10% write) was used to simulate real‑world applications. RedisJSON’s throughput remained stable as write ratios increased, while ElasticSearch’s throughput dropped dramatically.
RedisJSON’s ops/sec were 50.8× higher than MongoDB and 7× higher than ElasticSearch; its latency was up to 91× lower than MongoDB and 23.7× lower than ElasticSearch.
Full Latency Analysis per Solution
Latency percentiles (p0‑p9999) show MongoDB’s search latency is far lower than both ElasticSearch and RedisJSON, but RedisJSON maintains sub‑millisecond latency across all percentiles, with p99 at 0.23 ms versus 5.01 ms for MongoDB and 10.49 ms for ElasticSearch.
During writes, both MongoDB and RedisJSON keep sub‑millisecond latency at p99, while ElasticSearch exhibits high tail latency (>10 ms), likely due to GC pauses.
ElasticSearch vs RedisJSON Latency Comparison
At a sustained load of 6 K ops/sec, RedisJSON’s p99 read latency is 3 ms compared to ElasticSearch’s 162 ms; during updates, RedisJSON’s p99 remains at 3 ms versus 167 ms for ElasticSearch.
For search operations, RedisJSON starts with a p50 latency of 1.13 ms, ElasticSearch at 2.79 ms, but ElasticSearch’s higher percentiles increase sharply, with p99 at 163 ms versus RedisJSON’s sub‑33 ms.
Conclusion
The benchmark demonstrates that RedisJSON vastly outperforms both MongoDB and ElasticSearch in virtually every measured dimension, suggesting a potential shift in the NoSQL landscape.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Su San Talks Tech
Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
