Previously, I was not satisfied with the performance of my application running on Nginx version 1.27 in Laragon. Then, I tried using Laravel Octane with FrankenPHP as the chosen server.
I configured Laravel Octane in WSL2, which was then forwarded to Windows, and it successfully ran.
The problem is, I noticed a significant difference in performance. I tested the network load in Chrome DevTools and got the following results:
- Nginx + PHP 8.3 TS = Load time 116ms - 145ms
- WSL2 + Octane FrankenPHP = Load time 211ms - 368ms
As you can see, the load time difference is quite large—almost twice as slow or even worse!
Then, I tried a benchmark test using the /status endpoint (my application's health route) with the following parameters:
wrk -t2 -c50 -d30s https://domain.com/status
wrk -t2 -c50 -d30s https://domain2.com/status
I ran the benchmark three times for more accurate results, and the outcome was even worse. Octane achieved around 140 RPS - 233 RPS, while Nginx achieved 529 RPS - 798 RPS.
What is the issue?
I'm running the same application with the same configuration.
The only difference is that I used proxy_pass to Nginx when running Octane, following the Laravel Octane documentation.
Any idea why this is happening?