Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It would seem that this is more or less an alternative to Octane but I don't understand why there is documentation to also run Octane -> https://frankenphp.dev/docs/laravel/#laravel-octane/

Why would you run both?



It's not an "alternative", FrankenPHP is one of the 3 available drivers for Octane. See the Laravel docs https://laravel.com/docs/11.x/octane Octane is basically Laravel's branding for its "worker mode", i.e. running a long-running process which boots the framework and then processes requests, without needing to reboot the framework on every request.


Thanks for the answer.

So you would turn on Frankens worker mode to sit on top of Laravel Octanes workers?

My understanding is that Franken keeps the app running so Laravel wouldn't need to restart anyway?


No, you use Octane to run FrankenPHP. Octane will download and run FrankenPHP for you.

FrankenPHP is a program which has a webserver (Caddy) and PHP built-in, and worker mode allows it to run a pool of workers which have your Laravel app bootstrapped (all your service providers, middleware, controllers ready to go in memory) and then FrankenPHP feeds it requests as they come in.


To add, octane does a trick that, frow what i grasp from reading the source, it cap for a total of n request (200?) and kill the worker to preemptively free up ram


The Go container provides an environment in which to run Octane. Your webserver still needs to know to reroute traffic appropriately. You can think of FrankenPHP as more of a webserver/app server all bundled into one binary.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: