Performance Analysis of NoSQL Databases: MongoDB Document Store and Redis Key-Value Store in Microservices-Based Applications Using Flask
DOI:
https://doi.org/10.35870/ijsecs.v5i2.4206Keywords:
NoSQL, MongoDB, Redis, Microservices, Flask, Performance Benchmarking, Document Database, Key-value Store, Real-time Data Processing, CRUD OperationsAbstract
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.
Downloads
References
Alzaidi, M., & Vagner, A. (2022). Benchmarking Redis and HBase NoSQL databases using Yahoo Cloud Service Benchmarking tool. Annales Mathematicae et Informaticae, 56, 1–9. https://doi.org/10.33039/ami.2022.12.006
Rathore, M., & Bagui, S. S. (2024, September). MongoDB: Meeting the dynamic needs of modern applications. Encyclopedia, 4(4), 1433–1453. https://doi.org/10.3390/encyclopedia4040093
Blinowski, G., Ojdowska, A., & Przybylek, A. (2022). Monolithic vs. microservice architecture: A performance and scalability evaluation. IEEE Access, 10, 20357–20374. https://doi.org/10.1109/ACCESS.2022.3152803
Bushong, V., Abdelfattah, A. S., Cerny, T., Taibi, D., Lenarduzzi, V., & Khomh, F. (2021, September 1). On microservice analysis and architecture evolution: A systematic mapping study. Applied Sciences, 11(17), Article 7856. https://doi.org/10.3390/app11177856
Kausar, M. A., Nasar, M., & Soosaimanickam, A. (2022, August). A study of performance and comparison of NoSQL databases: MongoDB, Cassandra, and Redis using YCSB. Indian Journal of Science and Technology, 15(31), 1532–1540. https://doi.org/10.17485/IJST/v15i31.1352
Syach, U., & Edi, S. W. M. (2024). Perancangan Aplikasi Web Manajemen Data Produk Bisnis Perhiasan Berbasis Flask Dan Mongodb. IT-Explore: Jurnal Penerapan Teknologi Informasi dan Komunikasi, 3(2), 162-176. https://doi.org/10.24246/itexplore.v3i2.2024.pp162-176.
Jansson, J., & Vukosavljevic, A. (2021). Performance comparison between multi-model, key-value and documental NoSQL database management systems [Bachelor's thesis, University of Skövde].
Purwanto, T. (2023). Analisa Perbandingan Kinerja Rest Api Dengan Framework Flask, Laravel, Dan Express Js. Scientia Sacra: Jurnal Sains, Teknologi dan Masyarakat, 3(4), 49-55.
Febriyani, F., Pramukantoro, E. S., & Bachtiar, F. A. (2019). Perbandingan Kinerja Redis, Mosquitto, dan MongoDB sebagai Message Broker pada IoT Middleware. Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, 3(7), 6816-6823.
Mutmainnah, A., Musyrifah, M., & Zulkarnaim, N. (2022). Perbandingan Relational Database dan Non-Relational Database dalam Pengembangan Smart Tourism. Jurnal Teknik Informatika dan Sistem Informasi, 8(1), 150-160. https://doi.org/10.28932/jutisi.v8i1.4353
Andriani, E. O., Wahyuni, E. D., Ramadha, F. N., & Alfarizy, A. Z. (2024). Analisa Perbandingan Software Development Model Antara Metode Scrum Dan Metode Incremental. Jurnal Media Informatika dan Teknologi, 2(1).
Kazanavičius, J., Mažeika, D., & Kalibatienė, D. (2022, June). An approach to migrate a monolith database into multi‐model polyglot persistence based on microservice architecture: A case study for mainframe database. Applied Sciences, 12(12), Article 6189. https://doi.org/10.3390/app12126189
Thapa, A. B. (2022). Optimizing MongoDB performance with indexing–Practices of indexing in MongoDB [Bachelor's thesis, Degree programme in Information and Communications Technology]. https://urn.fi/URN:NBN:fi:amk-2022061317593.
Tallberg, S. (2020). A comparison of data ingestion platforms in real-time stream processing pipelines [Master's thesis, Mälardalen University]. https://urn.fi/URN:NBN:fi-fe2020081048285
Easwaramoorthy, S. V., Yun Xuan, K. O., Putra, L., Ern, N. C., & Sheng, T. J. (2025, January). Comparative study on Oracle, Neo4J, Cassandra, Redis, and MongoDB. Information Research Communications, 1(2), 104–119. https://doi.org/10.5530/irc.1.2.13
Renaldi, R., Santoso, B. C., & Natasya, Y. (2020). Tinjauan pustaka sistematis terhadap basis data MongoDB. Jurnal Inovasi Informatika, 5(2), 132-142.
Levin, S. M. (2024, April). Unleashing real-time analytics: A comparative study of in-memory computing vs. traditional disk-based systems. Brazilian Journal of Science, 3(5), 30–39. https://doi.org/10.14295/bjs.v3i5.553
Pandey, R. (2020). Performance benchmarking and comparison of cloud-based databases MongoDB (NoSQL) vs MySQL (Relational) using YCSB. Nat. College Ireland, Dublin, Ireland, Tech. Rep. https://doi.org/10.13140/RG.2.2.10789.32484
Nuriev, M., Zaripova, R., Yanova, O., Koshkina, I., & Chupaev, A. (2024, June). Enhancing MongoDB query performance through index optimization. In E3S Web of Conferences (Vol. 531, Article 03022). EDP Sciences. https://doi.org/10.1051/e3sconf/202453103022
Zhu, Y., Xia, T., Zhu, T., Zhao, Z., Li, K., & Hu, X. (2025). RAPO: An Automated Performance Optimization Tool for Redis Clusters in Distributed Storage Metadata Management. IEEE Access. https://doi.org/10.1109/ACCESS.2025.3556240
Al Maamari, S. R. S., & Nasar, M. (2025, April). A comparative analysis of NoSQL and SQL databases: Performance, consistency, and suitability for modern applications with a focus on IoT. East Journal of Computer Science, 1(2), 10–15. https://doi.org/10.63496/ejcs.Vol1.Iss2.76
Mohan, R. K., Kanmani, R. R. S., Ganesan, K. A., & Ramasubramanian, N. (2024). Evaluating nosql databases for olap workloads: A benchmarking study of mongodb, redis, kudu and arangodb. arXiv preprint arXiv:2405.17731.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Dava Ataya Shafi Andali, Yeremia Alfa Susetyo

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
1. Copyright Retention and Open Access License
Authors retain copyright of their work and grant the journal non-exclusive right of first publication under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
This license allows unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
2. Rights Granted Under CC BY 4.0
Under this license, readers are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, including commercial use
- No additional restrictions — the licensor cannot revoke these freedoms as long as license terms are followed
3. Attribution Requirements
All uses must include:
- Proper citation of the original work
- Link to the Creative Commons license
- Indication if changes were made to the original work
- No suggestion that the licensor endorses the user or their use
4. Additional Distribution Rights
Authors may:
- Deposit the published version in institutional repositories
- Share through academic social networks
- Include in books, monographs, or other publications
- Post on personal or institutional websites
Requirement: All additional distributions must maintain the CC BY 4.0 license and proper attribution.
5. Self-Archiving and Pre-Print Sharing
Authors are encouraged to:
- Share pre-prints and post-prints online
- Deposit in subject-specific repositories (e.g., arXiv, bioRxiv)
- Engage in scholarly communication throughout the publication process
6. Open Access Commitment
This journal provides immediate open access to all content, supporting the global exchange of knowledge without financial, legal, or technical barriers.
