Analisis Eksperimental Pengaruh Strategi Caching Redis terhadap Kinerja REST API pada Framework Laravel dan NestJS

Authors

  • Junaedi Junaedi Universitas Gunadarma, Indonesia
  • Yan Risa Aspi Sururi Universitas Gunadarma, Indonesia

DOI:

https://doi.org/10.56127/jts.v5i2.2542

Keywords:

Redis; REST API; Laravel; NestJS; performance evaluation

Abstract

The development of information technology has encouraged more services to interconnect through REST APIs. Under high read load, the same requests often access the relational database repeatedly, increasing latency and reducing throughput. This study aims to analyze the effect of Redis caching with a cache-aside pattern on REST API performance in the Laravel 12 and NestJS 11 frameworks. The method used is a quantitative experiment with a 2×2 factorial design combining framework and cache condition (no cache and Redis). Load testing was conducted using k6 at 50, 100, and 200 virtual users. Both APIs used the same MySQL dataset of 1,000 products, the same endpoints, and a 60-second cache TTL. The observed metrics include RPS, average latency, median, P95, error rate, and cache hit ratio. The results show that Redis provides a substantial performance improvement on NestJS. At 200 virtual users, average latency decreased by 89.8% and RPS increased by 111.3%, with a hit ratio of 99.7–99.9%. On Laravel, the hit ratio reached 100%, but latency improvement was only 6.7–10.8% at 50–100 virtual users and remained unstable at 200 virtual users. It can be concluded that Redis is beneficial for APIs with many read operations, but the magnitude of its benefit depends on the application runtime’s ability to handle concurrency.

References

Carlson, J. L. (2013). Redis in Action. Manning Publications.

Fielding, R. T. (2000). Architectural styles and the design of network-based software architectures (Doctoral dissertation). University of California, Irvine.

Grafana Labs. (n.d.). k6 documentation. https://grafana.com/docs/k6/

Jain, R. (1991). The art of computer systems performance analysis: Techniques for experimental design, measurement, simulation, and modeling. Wiley.

Laravel LLC. (n.d.). Cache. https://laravel.com/docs/cache

NestJS. (n.d.). Caching. https://docs.nestjs.com/techniques/caching

Okami101. (2026). A 2026 benchmark of main web API frameworks. https://www.okami101.io/blog/web-api-benchmarks-2026/

Patel, A., et al. (2025). Optimizing REST API response time in Spring Boot: An empirical evaluation of caching strategies. International Journal of Innovative Research in Technology. https://ijirt.org/publishedpaper/IJIRT194648_PAPER.pdf

Prasetyo, A., et al. (2024). Analisis kinerja cache Redis pada RESTful API berbasis Express.js. Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer. https://j-ptiik.ub.ac.id/index.php/j-ptiik/article/download/15978/7063

Redis Ltd. (n.d.). Cache-aside with Redis. https://redis.io/docs/latest/develop/use-cases/cache-aside/

Swapna, G., Punith Kumar, S. V., & Susmitha, E. (n.d.). Relix: A comparative latency framework for REST and gRPC using Redis acceleration. IRJAEH. https://irjaeh.com/index.php/journal/article/download/1718/1579

Downloads

Published

2026-07-30

How to Cite

Junaedi, J., & Yan Risa Aspi Sururi. (2026). Analisis Eksperimental Pengaruh Strategi Caching Redis terhadap Kinerja REST API pada Framework Laravel dan NestJS. Jurnal Teknik Dan Science, 5(2), 146–156. https://doi.org/10.56127/jts.v5i2.2542

Citation Check

Similar Articles

<< < 1 2 3 

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