ANALISIS PERBANDINGAN KINERJA APLIKASI LARAVEL DENGAN DAN TANPA REDIS CACHING DI LINGKUNGAN DENGAN BEBAN TINGGI - M. BAHRIL ILMI; Hengki Dwiyan Hermawan (Department of Science and Technology Ibrahimy University, 2026)
Laravel-based web applications are susceptible to significant performance degradation when user traffic increases, primarily due to the repeated execution of identical database queries that put excessive stress on MySQL. This study investigates the extent to which Redis, used as an in-memory caching layer, can offset this stress and measures the performance improvements achieved compared to a baseline configuration without caching. Load testing was conducted using k6s against a Docker-based containerized environment to ensure identical and fully reproducible test conditions. The tests included four concurrent user scenarios: 50, 100, 200, and 500 users, each sustained for 60 seconds. The application stack consisted of Laravel 11.x running PHP 8.3, MySQL 8.0 as the primary data store, and Redis 7.2 as the caching layer. The implemented caching strategies included query caching, route caching, and configuration caching. Observed metrics included response times at the P50, P95, and P99 percentiles, throughput in requests per second, server-side CPU and memory utilization, and error rates. The results showed that Redis reduced response times by 92% on average and increased throughput by up to 947% in a scenario with 500 concurrent users, while error rates remained below 1% across all test scenarios. The performance gap between configurations with and without caching widened consistently as load increased, with the most significant differences becoming apparent in scenarios with 100 users and above. These findings confirm that Redis is a highly effective caching solution for increasing the scalability of Laravel applications and is highly recommended for any deployment serving more than 100 concurrent users. Future research could investigate Redis's behavior under more extreme load conditions and explore adaptive cache invalidation strategies for handling high-frequency data writes.