journal article·2025-12-21Open access

Extending the Migration from Asynchronous to Reactive Programming in Java: A Performance Analysis of Caching, CPU-Bound, and Blocking Scenarios

Andrei Zbarcea, Cătălin Tudose, Alexandru Boicea

Applied Sciences· Volume 16· Issue 1

Abstract

Modern distributed systems increasingly rely on reactive programming to meet the demands of high throughput and low latency under extreme concurrency. While the theoretical advantages of non-blocking I/O are well-established, empirical understanding of its behavior across heterogeneous enterprise workloads remains fragmented. This study presents a unified architectural evaluation of asynchronous (thread-per-request) and reactive (event-loop) paradigms within a functionally equivalent Java microservice environment. Unlike prior studies that isolate specific workloads, this research benchmarks the architectural crossover points across three distinct operational categories: distributed caching, CPU-bound processing, and blocking I/O, under loads up to 1000 concurrent users. The results quantify specific boundary conditions: the reactive model demonstrates superior elasticity in I/O-bound caching scenarios, achieving 75% higher throughput and 68% lower memory footprint. However, this advantage is strictly workload-dependent; both paradigms converge to an identical CPU wall at processor saturation, where the reactive model incurs a quantifiable latency penalty due to event-loop contention. Furthermore, under blocking conditions, the reactive model’s memory efficiency (reducing footprint by ~50%) provides resilience against Out-Of-Memory (OOM) failures, even as throughput gains plateau. These findings move beyond generic performance comparisons to provide precise, data-driven guidelines for hybrid architectural adoption in complex distributed systems.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Software System Performance and Reliability · Cloud Computing and Resource Management · Parallel Computing and Optimization Techniques

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Faculty of Automatic Control and Computers, National University of Science and Technology Politehnica Bucharest, 060042 Bucharest, Romania

Luxoft Romania, Bd. Dimitrie Pompeiu 5-7, Et. 5, Sect 2, 020336 Bucharest, Romania

References (52)

Show source-provided references
1. Reactive Programming Paradigms in High-Throughput Distributed Systems
2. On the Design of Conditional Privacy Preserving Batch Verification-Based Authentication Scheme for Internet of Vehicles Deployment10.1109/TVT.2020.2981934 ↗
3. Multithreading in Java: Performance and Scalability on Multicore Systems10.1109/TC.2010.232 ↗
4. Asynchronous Programming in Java/Python: A Developer’s Guide
5. (2025, December 14). Project Reactor. Documentation. Available online: https://projectreactor.io/.
6. Tan, H., Wang, M., Shen, J., Vijayakumar, P., Moh, S., and Wu, Q.M.J. (2025). Blockchain-Assisted Conditional Anonymous Authentication and Adaptive Tree-Based Group Key Agreement for VANETs. IEEE Trans. Dependable Secure Comput., 1–16.10.1109/TDSC.2025.3628884 ↗
7. Christensen, B., and Husain, J. (2025, December 14). Reactive Programming in the Netflix API with RxJava. Available online: https://netflixtechblog.com/reactive-programming-in-the-netflix-api-with-rxjava-7811c3a1496a.
8. (2025, November 17). Java/JDBC Scalability and Asynchrony: Reactive Extension and Fibers. Available online: https://www.oracle.com/a/tech/docs/dev6323-reactivestreams-fiber.pdf.
9. (2025, December 14). Squbs: A New, Reactive Way for PayPal to Build Applications. Available online: https://medium.com/paypal-tech/squbs-a-new-reactive-way-for-paypal-to-build-applications-127126bf684b.
10. Harris, P., and Hale, B. (2025, December 14). Designing, Implementing, and Using Reactive APIs. Available online: https://www.infoq.com/articles/Designing-Implementing-Using-Reactive-APIs/.
11. (2025, December 14). Linux Foundation the Reactive Foundation Launches to Support Next Phase of Software Architecture. Available online: https://www.linuxfoundation.org/press/press-release/the-reactive-foundation-launches-to-support-next-phase-of-software-architecture.
12. Zbarcea, A., and Tudose, C. (2024). Migrating from Developing Asynchronous Multi-Threading Programs to Reactive Programs in Java. Appl. Sci., 14.10.20944/preprints202411.1467.v1 ↗
13. (2025, December 14). Caching at Scale with Redis. Available online: https://redis.io/wp-content/uploads/2021/12/caching-at-scale-with-redis-updated-2021-12-04.pdf.
14. Understanding Application-Level Caching in Web Applications: A Comprehensive Introduction and Survey of State-of-the-Art Approaches10.1145/3145813 ↗
15. Manes, B. (2025, December 14). Caffeine Cache Documentation. Available online: https://github.com/ben-manes/caffeine/wiki/Home.
16. (2025, December 14). Reference Guide. Available online: https://redis.io/docs/latest/develop/clients/lettuce/.
17. (2025, December 14). Reference Guide. Available online: https://redisson.pro/docs/.
18. Repin, V., and Sidorov, A. (2025). Distributed Caching System with Strong Consistency Model. Front. Comput. Sci., 7.10.3389/fcomp.2025.1511161 ↗
19. (2025, December 14). Scaling Lag in Kubernetes: What It Is and How to Avoid It. Available online: https://zesty.co/finops-glossary/scaling-lag/.
20. (2025, December 14). Kubernetes. Documentation. Available online: https://kubernetes.io/docs/home/.
21. Ponge, J., Navarro, A., Escoffier, C., and Le Mouël, F. (2021, January 18). Analysing the Performance and Costs of Reactive Programming Libraries in Java. Proceedings of the 8th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems, Chicago, IL, USA.10.1145/3486605.3486788 ↗
22. Pufek, P., Beronic, D., Mihaljevic, B., and Radovan, A. (October, January 28). Achieving Efficient Structured Concurrency through Lightweight Fibers in Java Virtual Machine. Proceedings of the 2020 43rd International Convention on Information, Communication and Electronic Technology (MIPRO), Opatija, Croatia.10.23919/MIPRO48935.2020.9245253 ↗
23. (2025, December 14). Handle R2DBC in Spring Projects. Available online: https://fintech.theodo.com/blog-posts/handle-the-new-r2dbc-specification-in-java.
24. R2DBC (2025, December 14). Documentation. Available online: https://r2dbc.io/.
25. (2025, December 14). JDBC Developer’s Guide. Available online: https://docs.oracle.com/en/database/oracle/oracle-database/21/jjdbc/jdbc-developers-guide.pdf.
26. Van den Vonder, S., Renaux, T., Oeyen, B., De Koster, J., and De Meuter, W. (2020, January 15–17). Tackling the Awkward Squad for Reactive Programming: The Actor-Reactor Model. Proceedings of the 34th European Conference on Object-Oriented Programming (ECOOP 2020), LIPIcs, Virtual.
27. Performance Comparison of Microservices Written Using Reactive and Imperative Approaches10.35784/jcsi.3698 ↗
28. Dahlin, K. (2020). An Evaluation of Spring WebFlux: With Focus on Built in SQL Features. [Master’s Thesis, Mid Sweden University].
29. Reactive Caching for Composed Services: Polling at the Speed of Push10.1145/3276522 ↗
30. Cache Invalidation Based on a Declarative Approach for Separating Business Logic of Microservices from Cache Update Rules
31. Comparative Analysis of Blocking and Non-Blocking Models in Rest APIS10.55905/cuadv17n8-013 ↗
32. Sharma, R. (2018). Hands-On Reactive Programming with Reactor: Build Reactive and Scalable Microservices Using the Reactor Framework, Packt Publishing.
33. Dobslaw, F., Vallin, M., and Sundstrom, R. (2020, January 27–28). Free the Bugs: Disclosing Blocking Violations in Reactive Programming. Proceedings of the 2020 IEEE 20th International Working Conference on Source Code Analysis and Manipulation (SCAM), Adelaide, Australia.10.1109/SCAM51674.2020.00025 ↗
34. Shahoor, A., Yi, J., and Kim, D. (2024, January 11). Preserving Reactiveness: Understanding and Improving the Debugging Practice of Blocking-Call Bugs. Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis, Vienna, Austria.10.1145/3650212.3680319 ↗
35. Nunez, D., Guyer, S.Z., and Berger, E.D. (2016, January 19). Prioritized Garbage Collection: Explicit GC Support for Software Caches. Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, Amsterdam, The Netherlands.10.1145/2983990.2984028 ↗
36. Satisfying Increasing Performance Requirements with Caching at the Application Level10.1109/MS.2020.3033508 ↗
37. Mayer, H., and Richards, J. (2025). Comparative Analysis of Distributed Caching Algorithms: Performance Metrics and Implementation Considerations. arXiv.
38. Sharma, A., Tahiliani, K., and Dubey, G.P. (2023, January 26). Reactive-Optimized Sentence Detection in Kubernetes Using OpenNLP and Native GraalVM Image with Framework Metric Comparison. Proceedings of the 2023 4th International Conference for Emerging Technology (INCET), Belgaum, India.10.1109/INCET57972.2023.10170347 ↗
39. PCJ Java Library as a Solution to Integrate HPC, Big Data and Artificial Intelligence Workloads10.1186/s40537-021-00454-6 ↗
40. Nordlund, A., and Nordström, N. (2022). Reactive vs. Non-Reactive Java Framework. [Bachelor’s Thesis, Mid Sweden University].
41. Issues on Performance of Reactive Programming in the Java Ecosystem with Persistent Data Sources10.1007/978-3-030-31964-9_24 ↗
42. Müller, T.S. (2025). Analyzing the Performance Impact of Reactive Relational Database Connection Drivers on Reactive Java Applications. [Bachelor’s Thesis, Federal University of Rio Grande do Sul (UFRGS)].
43. Enterprise-Scale Microservices Architecture: Domain-Driven Design and Cloud-Native Patterns Using the Spring Ecosystem
44. Mekki, M., Toumi, N., and Ksentini, A. (2022, January 26). Microservices Configurations and the Impact on the Performance in Cloud Native Environments. Proceedings of the 2022 IEEE 47th Conference on Local Computer Networks (LCN), Edmonton, AB, Canada.10.1109/LCN53696.2022.9843385 ↗
45. Docker Container Scheduler for I/O Intensive Applications Running on NVMe SSDs10.1109/TMSCS.2018.2801281 ↗
46. Optimizing Java Applications with Advanced Functional Programming: A Comparative Analysis of Java, Scala, and Kotlin
47. Beronic, D., Modric, L., Mihaljevic, B., and Radovan, A. (2022, January 23). Comparison of Structured Concurrency Constructs in Java and Kotlin—Virtual Threads and Coroutines. Proceedings of the 2022 45th Jubilee International Convention on Information, Communication and Electronic Technology (MIPRO), Opatija, Croatia.10.23919/MIPRO55190.2022.9803765 ↗
48. Hendricks, W. (2019, January 2–4). Review of NoSQL Data Stores: Using a Reactive Three-Tier Application for Software Developers to Achieve a High Availability Application Design Architecture. Proceedings of the 2019 Open Innovations (OI), Cape Town, South Africa.10.1109/OI.2019.8908187 ↗
49. InvaliDB: Scalable Push-Based Real-Time Queries on Top of Pull-Based Databases (Extended)10.14778/3415478.3415532 ↗
50. A Self-Adaptable Scheduler for Synchronizing Transactions in Dynamically Configurable Environments10.1016/j.datak.2008.02.004 ↗
51. A Descriptive Algorithm for Sobel Image Edge Detection
52. Software Development Methodologies: A Comparative Analysis