PHP-FPM, FrankenPHP, and Laravel Octane Benchmarked on the Same Server
A developer tested three PHP serving strategies — PHP-FPM, FrankenPHP classic, and Laravel Octane worker mode — running the same Laravel application on identical hardware. PHP-FPM processed 723 requests per second with 69ms average latency, while FrankenPHP classic performed slightly lower at 618 rps and 81ms, as both re-boot the Laravel framework on every request. Octane's worker mode dramatically outperformed both, achieving 2,516 rps at just 20ms latency by booting the framework once and keeping it in memory across requests. The key trade-off is that Octane's persistent app state requires developers to carefully manage globals and static variables to avoid data leaking between requests. Both FPM and Octane mitigate memory leaks by recycling workers after a configurable number of requests, and each runtime uses a different formula for scaling workers to available system resources.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in