When I deploy this, it appears to work as I see the startup commands for all three of those processes in the logs.
However, I don’t quite understand where those resources are coming from. Are they “machines”? (I don’t see anything listed under “Machines” though). Do they all share resources that are applied to the main application?
On Heroku/Render, we essentially create an application and then assign “dynos” (servers) to each of the processes. I’m having a hard time understanding where the resources are generated/created when using multiple processes in Fly.io.
Do they all share resources that are applied to the main application?
(unless I am mistaken) Each process is entitled to its own cpu/ram alloc.
I’m having a hard time understanding where the resources are generated/created when using multiple processes.
With flyctl--group directive you can target commands at a specific process within a multi-process Fly app. Ex: fly scale vm shared-cpu-2x --group workerhigh -a appname.
You could also scale them out independently: fly scale count workerhigh=8 worker=4 web=2 -a appname.
Fly machines are a (cheaper and restrictive) alternative to Fly app: That is, a Fly machine is really a http-only Fly app with wake-up-on-lan semantics.
As for why the VMs a multi-process Fly app may spin up aren’t visible in the dashboard… I don’t know. Might be a feature they haven’t thought to implement given multi-process isn’t generally available?
You can see if flyctl commands like flyctl ips private -a appname / flyctl status --all -a appname reveal Instances/VMs allocated to a given multi-process Fly app…
This feature needs love, no doubt. The new machines platform will be inheriting this feature soonish, but with more predictable behavior than the old system. Once that starts working, we’ll update the dashboard accordingly.
Should also add to the docs that autoscale doesn’t work when using multiple processes, in which case it’s better to have seperate apps and deploy them in unison in your CI pipeline.