Optimizing REST API Response Time in Spring Boot Applications Using Multi-Layer Caching Strategies: A Comparative Empirical Study

  • Unique Paper ID: 194648
  • PageNo: 4765-4770
  • Abstract:
  • Modern web applications built on microservice architectures increasingly depend on REST APIs for inter-service communication and client-server data exchange. In high-concurrency environments, database access latency emerges as the primary bottleneck degrading response time and user experience. This paper presents a rigorous empirical evaluation of four caching strategies — No Cache (baseline), Spring Cache with ConcurrentHashMap, Redis distributed cache, and a novel Hybrid Two-Level Cache (L1 in-memory + L2 Redis) — integrated into a Spring Boot 3.2 REST API serving a real-world Study Group Finder application. Using Apache JMeter, we subjected each strategy to load tests with 10 to 500 concurrent users over 60-second windows, measuring mean response time, 95th percentile latency, throughput (requests/second), and cache hit ratio. Results demonstrate that the Hybrid Two-Level Cache reduces mean response time by up to 94.1% compared to the no-cache baseline (from 847ms to 49ms at 500 concurrent users) while achieving a 96.8% cache hit ratio and sustaining 312.4 req/s throughput. Redis alone provided 78.3% improvement, while ConcurrentHashMap improved latency by 85.2% but introduced consistency risks in distributed deployments. These findings provide actionable guidelines for selecting caching strategies in Spring Boot microservices based on deployment topology, consistency requirements, and load characteristics.

Copyright & License

Copyright © 2026 Authors retain the copyright of this article. This article is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

BibTeX

@article{194648,
        author = {Khajamuddin Ansari and Nadim Ansari and Md Nafis Ansari and Bittu kr. Gupta and Javed Hussain},
        title = {Optimizing REST API Response Time in Spring Boot Applications Using Multi-Layer Caching Strategies: A Comparative Empirical Study},
        journal = {International Journal of Innovative Research in Technology},
        year = {2026},
        volume = {12},
        number = {10},
        pages = {4765-4770},
        issn = {2349-6002},
        url = {https://ijirt.org/article?manuscript=194648},
        abstract = {Modern web applications built on microservice architectures increasingly depend on REST APIs for inter-service communication and client-server data exchange. In high-concurrency environments, database access latency emerges as the primary bottleneck degrading response time and user experience. This paper presents a rigorous empirical evaluation of four caching strategies — No Cache (baseline), Spring Cache with ConcurrentHashMap, Redis distributed cache, and a novel Hybrid Two-Level Cache (L1 in-memory + L2 Redis) — integrated into a Spring Boot 3.2 REST API serving a real-world Study Group Finder application. Using Apache JMeter, we subjected each strategy to load tests with 10 to 500 concurrent users over 60-second windows, measuring mean response time, 95th percentile latency, throughput (requests/second), and cache hit ratio. Results demonstrate that the Hybrid Two-Level Cache reduces mean response time by up to 94.1% compared to the no-cache baseline (from 847ms to 49ms at 500 concurrent users) while achieving a 96.8% cache hit ratio and sustaining 312.4 req/s throughput. Redis alone provided 78.3% improvement, while ConcurrentHashMap improved latency by 85.2% but introduced consistency risks in distributed deployments. These findings provide actionable guidelines for selecting caching strategies in Spring Boot microservices based on deployment topology, consistency requirements, and load characteristics.},
        keywords = {Spring Boot, REST API optimization, caching strategies, Redis, ConcurrentHashMap, performance benchmarking, microservices, Apache JMeter, response time, throughput.},
        month = {March},
        }

Cite This Article

Ansari, K., & Ansari, N., & Ansari, M. N., & Gupta, B. K., & Hussain, J. (2026). Optimizing REST API Response Time in Spring Boot Applications Using Multi-Layer Caching Strategies: A Comparative Empirical Study. International Journal of Innovative Research in Technology (IJIRT), 12(10), 4765–4770.

Related Articles