Advantages/Disadvantages of Machine Apps

Machines are basically “v2” of the apps platform, and will some day be the apps platform.

Machines:

  1. Has an API
  2. Will stop the VM if the main process stops at exit 0
  3. Will start/awaken the VM on network access (if a service is defined for a port)
  4. Are ephemeral (stop / start puts it back into a “fresh” state, data doesn’t persist)
    • this makes them re-usable, you don’t necessarily need to destroy/re-create a machine
  5. You can create multiple machines within an app.
    • If multiple machines are listening on the same port (defined in the services config) within an app, Fly’s proxy will load balance between those machines for any given network request to that port.

Right now you can’t migrate a Nomad app to a Machine app. You can destroy an app and recreate it as a machine app, or create a new app for the purpose of using the scheduler feature.

This would unfortunately mean re-setting your env vars and secrets.

Machines has an API, but you can use flyctl to manage machines as well. When you hear us say “some features are not yet supported by machines”, that’s purely true in some cases I think (trying to remember what they might be…maybe defining multiple processes is an example).

But what we’re mostly staying is thatflyctl is in need of changes to manage some aspect of machines so it’s on par with the Nomad-based app experience.

You can do most things yourself with Fly’s APIs

Let me know if I’m not filling in any details you wish I did! This could turn into some documentation.

4 Likes