Skip to content

Glossary

Laravel Octane: the framework stays in memory between requests

A way of running the application permanently instead of starting it fresh for every request.

Normally a PHP application starts from scratch on every request: read the configuration, assemble the services, register the routes, do the work, throw it all away again. That is remarkably robust, because no request can leave anything behind for the next one, but it costs time on every call.

Octane turns that round. The application is started once and stays in memory; requests are served by workers that keep running. The start-up disappears and the response time drops noticeably.

What you take on in exchange

The robustness was no accident, it came from the restart. When the application stays in memory, whatever a programming mistake leaves there survives too. A value that accidentally persists between two requests can mean that user A briefly sees user B’s data.

That is manageable, but it demands care in places where none was needed before, and it applies to third-party packages as well. So in our projects Octane is a deliberate decision taken after a measurement, not something that runs along by default.

FAQ

Häufige Fragen

Would it help our application?
That can be measured rather than guessed. If the response time consists mainly of database queries, Octane brings little, because it changes nothing about those. If a lot of time sits in starting the application itself, the gain is clear. A measurement belongs before a change like this.

Related

Terms that belong with this one

A project, or a question?

Write and tell us what it is about. You get an assessment from somebody who works with Laravel themselves, not from a sales desk.