つい数時間前、新しい Laravel の First Party ライブラリが正式リリースされました。 Laravel Octane と呼ばれています。 これはどんなライブラリか一行で説明すると、 「php-fpm に置き換わるミドルウェアを使って、 Laravel アプリケーションを超高速でさばくためのライブラリ」 です。 現在の一般的な PHP アプリケーションは、 nginx や Apache の裏側で php-fpm や mod_php を使ってサーブしています。 その利点として、「毎リクエストごとにメモリを解放することで、メモリリークなどを起こさない」ようになっています。 逆にいえば、毎リクエストごとに1から必要な変数をメモリに展開する必要があるため、スタートアップ速度がサービスの規模に比例して遅くなっていく、ということです。 もちろん PHP 8.0 で入った JIT 含め、