Laporkan Masalah

Analisis Performa Nginx, Apache, dan Haproxy Sebagai Reverse Proxy Menggunakan Skenario Uji Beban Bertahap dan Resource Limiting pada Docker Swarm

Dwi Ayu Rahmadani, Alif Subardono, S.T., M.Eng.

2026 | Tugas Akhir | D4 TEKNOLOGI JARINGAN

Peningkatan kebutuhan layanan berbasis web menuntut web server yang mampu memberikan performa tinggi, stabil, dan memiliki ketahanan terhadap kegagalan layanan. Nginx, Apache, dan HAProxy dipilih karena merupakan layanan perangkat lunak open-source yang banyak digunakan sebagai web server maupun reverse proxy. Oleh karena itu, penelitian ini bertujuan untuk menganalisis dan membandingkan performa ketiga layanan tersebut sebagai reverse proxy pada lingkungan Docker Swarm menggunakan skenario uji beban bertahap, resource limiting, dan failover. Metode yang digunakan adalah menggunakan tiga virtual mesin berbasis Ubuntu Server yang dikonfigurasi sebagai satu cluster Docker Swarm. Pengujian dilakukan menggunakan tools k6 melalui tiga skenario, yaitu uji beban bertahap, resource limiting dengan pembatasan CPU dan memori, serta pengujian failover. Hasil penelitian menunjukkan bahwa Nginx memberikan performa terbaik pada skenario uji beban bertahap dengan 135.647 request, throughput 376,01 req/s, dan response time 122,68 ms. Pada skenario resource limiting, Apache menunjukkan performa terbaik dengan 92.472 request, throughput 307,54 req/s, dan response time 108,73 ms. Sementara itu, pada skenario failover, Nginx unggul pada total request dan response time, sedangkan HAProxy memiliki error rate terendah sebesar 23,56%, sehingga lebih baik dalam mempertahankan ketersediaan layanan saat terjadi kegagalan. 

The increasing demand for web-based services requires web servers that provide high performance, stability, and resilience against service failures. Nginx, Apache HTTP Server, and HAProxy were selected because they are widely used open-source software for web server and reverse proxy implementations. Therefore, this study aims to analyze and compare the performance of these three services in a Docker Swarm environment using step load testing, resource limiting, and failover scenarios. The research was conducted using three Ubuntu Server based virtual machines configured as a single Docker Swarm cluster. Performance testing was carried out using the k6 load testing tool under three scenarios: step load testing, resource limiting through CPU and memory constraints, and failover testing. The results show that Nginx achieved the best performance in the step load testing scenario, processing 135,647 requests, with a throughput of 376.01 requests/s and an average response time of 122.68 ms. Under the resource limiting scenario, Apache HTTP Server demonstrated the best performance, handling 92,472 requests, achieving a throughput of 307.54 requests/s, and an average response time of 108.73 ms. In the failover scenario, Nginx achieved the highest total requests and the lowest response time, while HAProxy recorded the lowest error rate of 23.56%, indicating better service availability during failure conditions. 

Kata Kunci : Docker Swarm, Reverse Proxy, Web Server, Performa, Resource Limiting

  1. D4-2026-492530-abstract.pdf  
  2. D4-2026-492530-bibliography.pdf  
  3. D4-2026-492530-tableofcontent.pdf  
  4. D4-2026-492530-title.pdf