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

Authors

DOI:

https://doi.org/10.35870/ijsecs.v5i2.4206

Keywords:

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

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.

Downloads

Download data is not yet available.

Author Biographies

  • Dava Ataya Shafi Andali, Satya Wacana Christian University

    Informatics Engineering Study Program, Faculty of Information Technology, Universitas Kristen Satya Wacana, Salatiga City, Central Java Province, Indonesia

  • Yeremia Alfa Susetyo, Satya Wacana Christian University

    Informatics Engineering Study Program, Faculty of Information Technology, Universitas Kristen Satya Wacana, Salatiga City, Central Java Province, Indonesia

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

2025-08-01

Issue

Section

Articles

How to Cite

Andali, D. A. S., & Susetyo, Y. A. (2025). Performance Analysis of NoSQL Databases: MongoDB Document Store and Redis Key-Value Store in Microservices-Based Applications Using Flask. International Journal Software Engineering and Computer Science (IJSECS), 5(2), 691-705. https://doi.org/10.35870/ijsecs.v5i2.4206

Similar Articles

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

Most read articles by the same author(s)