@mayailurus says on the frequency downtime happens:
It’s pretty frequent. The Fly.io platform will migrate your Machine to a different underlying physical host, without you asking, which involves a shutdown for a while, and each deploy also stops the Machine for varying amounts of time.
Moreover, congestion can cause a Machine to not be able to start until an auto-migration can happen, and in the past some people have found their (single-Machine) app offline for multiple hours. Volumes can exacerbate this, although the details aren’t really documented. (Last I heard, volumes prevented auto-migration entirely, but I get the impression that’s been relaxed recently.)
I have some further questions:
- Is there any data so I can know the actual frequency? Which timezone does downtime frequently happen?
- Why does my machine need to be migrated to another physical host? Would that host be in the same region?
- If the purpose of having a second machine is to avoid downtime, then it should also attach to the volume, right? So the fact that volumes are not shared between machines defeat that purpose?
- What counts as rootfs? If I create a custom file or folder under root, is it a part of rootfs? If I set
persist_rootfsasalwaysorrestart, then would that file or folder be kept, or just changes inside default Linux directories are kept? Would mounting the rootfs to the volume be a way to have it persistent while setting the config tonever? - I have only one machine and want to start a new one, what do I need to make sure the data is shared? It seems to me that I need to set another machine dedicated for database. This is true if the backup machine is in the same region, and even true if I want it in another region. But then I have to worry that that database machine can have downtime of its own.