Published: 2025-08-01

Performance Analysis of NoSQL Databases: MongoDB Document Store and Redis Key-Value Store in Microservices-Based Applications Using Flask

DOI: 10.35870/ijsecs.v5i2.4206

Front Cover IJSECS VOLUME 5 NOMOR 2 AGUSTUS 2025

Downloads

Article Metrics
Share:

Abstract

The research examines performance characteristics between two NoSQL database architectures: MongoDB as a document-oriented system and Redis as an in-memory key-value store, implemented within microservices applications developed using Flask framework. Growing enterprise requirements for scalable, high-performance systems drive increased adoption of NoSQL databases paired with microservices architectures. The investigation assesses database performance through systematic CRUD and aggregation operations executed on nested data structures that mirror real-world public transportation datasets. Redis demonstrates superior operational efficiency in real-time scenarios, attributed to its memory-resident architecture. Empirical findings reveal Redis maintains consistently reduced response latencies compared to MongoDB across virtually all tested operations. Read operations show Redis achieving 0.00037-second average execution times, representing a 60.22% performance improvement over MongoDB's 0.00093-second baseline. Read-by-ID queries exhibit more pronounced differences, with Redis completing operations in 0.00105 seconds against MongoDB's 0.00873 seconds—an 87.96% performance differential. Update and delete operations demonstrate Redis execution times of 0.00026 and 0.00028 seconds respectively, compared to MongoDB's 0.00088 and 0.00087 seconds, yielding approximately 70% and 68% performance advantages. Delete-all operations reveal substantial disparities: Redis completes bulk deletions in 0.083 seconds while MongoDB requires 0.27 seconds, representing a 69.26% performance penalty. Aggregation functions including summation, minimum, and maximum value calculations follow similar performance patterns, with Redis executing operations more efficiently across all test scenarios. Performance evaluations were conducted on Windows 10 Pro 64-bit (Build 19045) equipped with 15.8 GB memory and an 11th Generation Intel® Core™ i5-11400H processor featuring 6 cores and 12 threads. Testing utilized MongoDB version 1.45.4 and Redis version 2.66, with hardware specifications directly influencing benchmark outcomes. Results indicate Redis optimization for applications demanding high-performance real-time data access, while MongoDB serves applications requiring flexible document storage capabilities and complex data structure management.

Keywords

NoSQL ; MongoDB ; Redis ; Microservices ; Flask ; Performance Benchmarking ; Document Database ; Key-value Store ; Real-time Data Processing ; CRUD Operations

Peer Review Process

This article has undergone a double-blind peer review process to ensure quality and impartiality.

Indexing Information

Discover where this journal is indexed at our indexing page to understand its reach and credibility.

Open Science Badges

This journal supports transparency in research and encourages authors to meet criteria for Open Science Badges by sharing data, materials, or preregistered studies.

Similar Articles

You may also start an advanced similarity search for this article.

Most read articles by the same author(s)