ANALISA PERBANDINGAN PERFORMA PHP PADA WEB SERVICE: SWOOLE VS APACHE VS NGINX VS PHP-FPM
Kata Kunci:
Web Service PHP, Cloud Computing, Swoole, ApacheAbstrak
Penelitian ini bertujuan untuk menganalisis dan membandingkan performa web service PHP pada empat konfigurasi server, yaitu Apache, Nginx, PHP-FPM, dan Swoole, dalam lingkungan cloud computing. Pengujian dilakukan menggunakan pendekatan eksperimental pada platform Amazon Web Services (AWS) dengan spesifikasi server yang seragam. Simulasi beban dilakukan menggunakan k6 dengan variasi jumlah Virtual Users hingga 5000 VUs untuk merepresentasikan skenario akses pengguna secara simultan. Parameter performa yang dianalisis meliputi response time, latency, throughput, error rate, serta penggunaan sumber daya sistem berupa CPU dan memori. Hasil penelitian menunjukkan bahwa Swoole memberikan performa paling unggul dan stabil dibandingkan konfigurasi web service PHP lainnya, khususnya pada skenario concurrency tinggi. Arsitektur asynchronous dan penggunaan coroutine memungkinkan Swoole mempertahankan response time dan latency yang rendah, throughput yang tinggi, serta error rate yang relatif stabil meskipun jumlah Virtual Users meningkat hingga 5000 VUs. Selain itu, Swoole juga menunjukkan efisiensi penggunaan sumber daya CPU dan memori yang lebih baik, sehingga mampu menangani lonjakan beban secara optimal tanpa degradasi kinerja yang signifikan. Temuan ini menegaskan bahwa Swoole merupakan solusi web service PHP yang paling optimal untuk lingkungan cloud dengan kebutuhan skalabilitas dan performa tinggi.
This study aims to analyze and compare the performance of PHP web services on four server configurations, namely Apache, Nginx, PHP-FPM, and Swoole, in a cloud computing environment. Testing was conducted using an experimental approach on the Amazon Web Services (AWS) platform with uniform server specifications. Load simulations were conducted using k6 with varying numbers of Virtual Users up to 5000 VUs to represent simultaneous user access scenarios. Performance parameters analyzed included response time, latency, throughput, error rate, and system resource usage in the form of CPU and memory. The results of the study show that Swoole provides the most superior and stable performance compared to other PHP web service configurations, especially in high concurrency scenarios. The asynchronous architecture and the use of coroutines allow Swoole to maintain low response time and latency, high throughput, and a relatively stable error rate even when the number of Virtual Users increases to 5000 VUs. In addition, Swoole also shows better efficiency in the use of CPU and memory resources, so it is able to handle load spikes optimally without significant performance degradation. These findings confirm that Swoole is the most optimal PHP web service solution for cloud environments with high scalability and performance requirements.




