Scaling Laravel to 0 with Machines

Don’t think anyone’s profiled it specifically with Octane. Usually (and like you identified), if your users are spread across the world, spinning up a Machine closer to them might be more performant (syncs nicely with night/day; work/leisure cycles, too). Recall that it is upto the app to decide just how long it should idle around before it quits.

flyctl logs do contain information on how long it takes to boot-up a machine and get the main process going.

Try it out and let us know how Octane performs! (:

The part about startup cost… At some level, it is on the docker image that is being deployed. I’d imagine a large docker image is likely slower to setup than a smaller one (like distroless images or alpine images). Related: Difference between AWS Lambda and Fly Machines? - #2 by ignoramous

Another area is to ensure the main (entrypoint) process itself starts up in a jiffy.

VM snapshots for Machines may happen in the near-term, which should then improve startup times considerably and relegate Your application boot time is something you should optimize to merely an academic exercise.

1 Like