Difference between Apps and Machines

I’m not sure how they are different. Do you mean on a machine I can create multiple apps?

And how can I deploy a bare machine with no app on it? Like I would have ssh access to the machine and I’ll be able to install what I want to.

example for my project difference like this.

i have nodejs application but i have cron and queue working.

i can create multiple machine on one Apps.

apps machine = just for api
worker machine = for queue and worker
cron machine = for cronjob

For ssh you can access fly ssh console --app yourapps
but only 1 machine only that’s apps machine only

1 Like

Sorry, I still don’t understand. Can you please paraphrase?

As bogordesain alluded to, Machines are Fly Apps v2. So, treat them as such.

Since Machines are low-level, there’s incredible amount of control in the hands of developers: For example, if you wanted to, you could spin up a different docker image with every machine in a single Fly app, but such a makeup would get very tricky to reason about pretty fast. Homogenous apps make for a nice namespace boundary, if you will.

You could build a Fly-like service atop Fly Machines, if you wanted (but that’s not what most people running Fly apps want).

Read also:

@ignoramous

So do you mean, I would simply get a VM with kernel-level control? Let’s say I can spin up LXC or multiple Docker containers inside the machines?

No, not really. The unit of deploy still remains a docker / runc image. Machines aren’t bare metal, nor do Machines let you BYOK (boot your own kernel).

To be clear: At the moment, there’s no offering at Fly where you get a full VM (baremetal or otherwise) like you describe.

Apps and Machines are fairly close in feature set - you “Dockerize” your application, and deploy it to the app infrastructure, or the machine infrastructure.

Machines give you more options about how/when your programs are run. The very top of this article has some details about what machines offers you: On-Demand Compute · Laravel Bytes

Additionally, machines are “apps v2” as described - someday, all Apps will run on Machines. Apps currently run on Nomad clusters. Machines don’t run on Nomad.

2 Likes

Think of it like this:

Fly Machine - a single VM instance, in one region, that can boot very quickly

Fly App - an abstraction on top of Fly Machines that manages them for you according to a fly app configuration (how many regions, which regions, auto-scaling, etc.)

Previously, you could only use Fly Apps according to the constraints of their configurations. By giving you access to the lower level Fly Machines that Fly Apps use, you can use them however you want, but you need to do more of the work of orchestrating how/when/where/etc they are spun up.

As an example, you could write software that automates Fly Machines to act similarly to AWS Lambda. Or implement your own auto-scaling strategy instead of what Fly Apps provide out of the box.

4 Likes