I’ve spent the last few days playing with Machines with little prior experience on the Fly platform and wanted to record some feedback. I know machines are very new and I’m sure a lot of this is already known but I’m hoping at least a bit of it can be useful as I haven’t seen a ton of discussion about these points on the forum.
Documentation
The Fly documentation in general is great and high quality, however the introduction of machines makes most of the Fly documentation quite confusing. My perspective is that I am new to the platform and am primarily here for machines. The concept of “apps” is confusing because there seem to be 2 kinds of apps (regular apps and machines apps, but this isn’t really explicitly stated anywhere) and its not really clear which docs are talking about regular apps versus machines apps. To use machines I need to know enough about apps to know how network routing works but I also need to ignore most of the stuff about per-app configuration.
Some examples of confusion:
fly.toml
seems to be the way to go when running flyctl
commands, basically just for the app
field when dealing with machines. This initially lead me to think I should deploy an app and also build machines and they are designed coexist in some way (and in fact you can do that, which is confusing).
Volumes, it seems like volumes just can’t work with machines but there isn’t anything that says this explicitly. I kind of assumed since I can assign an ip address at the app level with flyctl
I could do the same with volumes but that doesn’t seem to be the case since there isn’t a supported field for it in the machine creation POST request body. This is another case where you have to just ignore most of the platform docs except those specifically mentioning machines.
registry.fly.io is almost undocumented (the only page I could find referencing it is flyctl auth docker · Fly Docs I had to search the forum to figure out how it is intended to be used and what its privacy model was). I think this is because flyctl
generally abstracts this away from you but for machines it seems very relevant for deploying private docker images.
Generally searching the forum has been very useful for finding implementation details on the fly platform outside of machines that aren’t described in depth on the docs site and I’m sure the same will be true about machines in the future.
Using Machines
Disclaimer: I’ve been playing around with UDP and as far as I can tell UDP is a bit of a second class citizen to TCP here, so I might have found edge cases with it and machines.
Its a bit weird to me that machines are the only place where you advertise using API calls directly instead of flyctl
calls, which I get since its probably aimed at programmatic use but the mix of flyctl
calls like flyctl ips allocate-v4
and network requests is a bit odd. It’d be great if there were examples of all steps using either flyctl
or network requests (I’ve read on the forum that there is an unadvertised GraphQL API that can be used for many things, I’m planning on taking a look into this to get a full API driven workflow for provisioning machines).
In my time playing around with machines I’ve found a few bugs and I’ll list them below, but generally speaking its a really cool platform that definitely lives up to expectations from the product announcement. Its extremely fast and works great when you’re doing everything right.
Bugs
fly machine list
often shows outdated info. flyctl machine status $machineId
shows expected status in most cases.
I often get into states where I have a machine stuck in a state and can’t remove it because it isn’t in an eligible state to be removed. The way I’ve been removing these is just deleting and recreating the app (flyctl machine kill
, flyctl machine stop
and flyctl machine remove
don’t work). Some of the ways to reliably reproduce this are:
- Create a machine with a docker image from the fly registry that hasn’t been uploaded yet, it’ll be stuck in the “creating” state forever
- When my app on the machine exits with code
0
, the machine will start itself when a network request comes in, when this happens (it starts super quick by the way, it feels very magical) the status change isn’t recorded in the platform (it is stuck at “stopped”) nor does it get registered with the *.internal DNS addresses. I can’t use any of the commands to control it since it is in “stopped” state but if Ifly ssh console "$ipv6Address
I can connect to the machine (but interestinglyfly ssh console
won’t find it presumably because the DNS entries aren’t registered)
Billing
A quick note on hacking around with the Fly platform. The pricing seems friendly for playing around which is awesome, but I also don’t have a good way to tell if I currently have resources that are billing (if I left something behind / forgot to clean it up if I didn’t delete the app to avoid recreating it tomorrow) and I also don’t know how much it costs to run the resources I am using in real time. It doesn’t feel great to have uncertainty over my bill being $0 or $50 until some undetermined point in the future when the bill pops up.