-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

High Performance with Laravel Octane
By :

Laravel is a great framework in the PHP ecosystem that helps developers to build web applications quickly and reliably.
It includes, as dependencies, some great tools from the PHP ecosystem, such as Symfony packages, and some other solid and mature packages such as Monolog for logging, Flysystem for accessing files and storage, and CommonMark for managing Markdown format.
From the Symfony world, Laravel includes packages such as Symfony/routing
to manage routing, and http-foundation
and http-kernel
to manage HTTP communication.
All this is just to say that Laravel uses the best parts of the PHP ecosystem, puts them together, and provides tools, helpers, classes, and methods to simplify the usage of all the tools from the developer’s perspective.
In addition, Laravel is more than a framework. Laravel is an ecosystem.
Laravel also provides applications and services that are integrated with the framework.
For example, Laravel provides the following:
In this book, we will analyze the last tool in this list: Laravel Octane.
We will go over the use of other tools within the Laravel ecosystem, such as Sail (for simplifying the installation process of a complete development environment), and Valet (for correctly setting up the local environment to run a web server and PHP). Also, Laravel Octane depends on important software that we will see in-depth throughout the book. Laravel Octane has strong requirements: it requires additional software such as Swoole or RoadRunner.
But one step at a time.
Before we delve into the tools and their configuration, it’s important to understand some basic mechanisms for managing HTTP requests.
HTTP
HTTP is a protocol that defines rules, messages, and methods for fetching resources on the web, such as HTML documents (web pages) and assets. Clients (who require the resource) and servers (who serve the resource) communicate by exchanging messages. The client sends requests, and the server sends responses.
One of the goals of the book is to empower you to improve the performance of your web applications by doing different things, starting with designing the architecture of the application, choosing and using the right tools, writing code, and finally, releasing the application.
The tools we are going to analyze and use will do much of the work, but I think it is important to understand the underlying dynamics to have a good awareness of how the various tools work to enable you to configure, integrate, and use them to the best of their ability.
Before we get deeper into the workings of Laravel Octane, let me take you through how servers typically deal with HTTP requests by explaining the HTTP request lifecycle.