Detect when app moves to different region

For Apps v1, I guess you can accomplish it with the --max-per-region directive. It only works with rolling deploys.

Disable autoscale at any rate. Also, with multi-process Fly apps, things are more tricky, so don’t use those either, if you can avoid it.

Apps v2 platform will (?) have an “events” API (and apparently all Fly apps will be migrated over to v2 seamlessly some time in the future). Until then, you can periodically TXT query (vms.<app-name>.internal) the dns resolver running at [fdaa::3]:53 from within any Fly VM, and do a pseudo service discovery to find just where existing VMs are running and alert in case something’s happened that you didn’t expect.

Another alternative might be to read the FLY_REGION env variable on process startup, publish custom metrics and alert (unfortunately, Fly-native alerts are defunct; you may also consider using any other form of notification mechanism, like Queues or webhooks or emails) on them, for example say there’s an unexpected number of VMs in a single region.