What is Laravel Octane?

Answer

Laravel Octane supercharges application performance by using high-performance application servers — Swoole or RoadRunner — to keep the Laravel application in memory between requests. In traditional PHP-FPM, the entire application bootstraps (loads service providers, binds services, reads config) on every request — wasting time. With Octane, the app is booted once and kept in memory; each request reuses the already-bootstrapped application, eliminating bootstrap overhead. Results: 10-30x faster throughput compared to PHP-FPM. Caveats: since state persists between requests, you must be careful with singleton-bound objects that may become stale or carry state. Octane provides tools like $app->flush() for cleanup. It also supports concurrent tasks via Swoole coroutines.