Back in 2021, we announced the release of Laravel Octane — a first-party package for Laravel that supercharges your Laravel application's performance by executing your code using high-powered application servers like Swoole and RoadRunner. We have also shipped built-in support for Octane in Forge and Vapor, ensuring an even smoother Octane onboarding experience.
Today, we're super excited to announce a new Laravel Octane integration: FrankenPHP.
FrankenPHP is a modern PHP server, developed by Kévin Dunglas, that supports modern web features such as early hints, automatic SSL certificate management, and Zstandard compression. Check out the FrankenPHP website to learn more about what it has to offer: frankenphp.dev.
We're also pumped that FrankenPHP shows fantastic performance results when compared with our previous server integrations. For example, tested on Apple's MacBook M1 Pro using Pest's Stressless plugin, we observed very promising performance results. Here is a simple stress test that performs a
/GET request on Laravel's welcome page:
# Concurrency 1 for 5 seconds...
./vendor/bin/pest stress http://127.0.0.1:8000
Swoole Medium Request Duration ........... 4.94 ms
RoadRunner Medium Request Duration ....... 2.61 ms
FrankenPHP Medium Request Duration ....... 0.88 ms
# Concurrency 8 for 5 seconds...
./vendor/bin/pest stress http://127.0.0.1:8000 --concurrency=8
Swoole Medium Request Duration ........... 5.39 ms
RoadRunner Medium Request Duration ....... 4.00 ms
FrankenPHP Medium Request Duration ....... 1.59 ms
FrankenPHP also ships with built-in support for Mercure, a modern and convenient replacement for WebSockets, which we are hoping to integrate with Laravel's broadcasting capabilities in the future.
To learn how to get started with Octane and FrankenPHP, check out our thorough Octane documentation.
We hope you enjoy this new addition to the Laravel ecosystem. At Laravel, we're committed to providing you with the most robust and developer-friendly PHP experience in the world. Build something amazing!