Claim Missing Document
Check
Articles

Found 1 Documents
Search

Analisis Eksperimental Pengaruh Strategi Caching Redis terhadap Kinerja REST API pada Framework Laravel dan NestJS Junaedi Junaedi; Yan Risa Aspi Sururi
Jurnal Teknik dan Science Vol. 5 No. 2 (2026): Juni : Jurnal Teknik dan Science
Publisher : Asosiasi Dosen Muda Indonesia

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.56127/jts.v5i2.2542

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.