The Laravel team is working Laravel Octane, a tool to improve the performance of your Laravel app. After releasing the beta in April, Octane released a stable version of !
Octane has some outstanding performance criteria using high-powered application servers integrated with Laravel. Some requirements to consider considering octane's determination and readiness:
- Octane requires PHP v8.0+
- Octane supports Roadrunner, an application server, load balancer, and operations manager written in Golang.
- Supports Swoole PHP, a high-performance programmable server for PHP with Octane, Async IO, Coroutines and Fibers
- Laravel Sail provides an easy way to start with both Roadrunner and Swoole
Read the documentation carefully when deciding which basic server you want to run. Both servers offer high performance, but Octane provides vendor-specific features for Swoole that are not possible in Roadrunner.
When using Swoole, you have access to an octane cache drive:
Cache::store('octane')->put('framework', 'Laravel', 30);
According to readme dosy,the Octane cache driver (supported by the Swoole table):
[Swoole] provides read and write speeds of up to 2 million transactions per second. This cache driver is supported by Swoole tables. All data stored in the cache is available to all employees on the server. However, the server will clear cached data during the restart.
You can also take advantage of Simultaneous Missions with Swoole; this means that you can execute operations at the same time through light background tasks:
use Laravel\Octane\Facades\Octane;[$users, $servers] = Octane::concurrently([
fn () => User::all(),
fn () => Server::all(),
Finally, Swoole has the concept of Swoole tables that "provide excessive performance efficiency and the data in these tables can be accessed by all employees on the server".
Here's an example of how you can interact with Swoole tables using Octane:
Octane tables config in config/octane.php
'tables' => [
'example:1000' => [
'name' => 'string:1000',
'votes' => 'int',
use Laravel\Octane\Facades\Octane;Octane::table('example')->set('uuid', [
'name' => 'Nuno Maduro',
'votes' => 1000,
To learn more
To start using Octane, you can go to the laravel documentation.