We’re running an app as a cache for another app, with instances in the same region. We used <appname>.internal in an environment varaiable set in our fly.toml, thinking it should aways connect to the same region as long as there is an instance running there. However, this doesn’t seem to be the case.
There is <region>.<appname>.internal, but the first part is dynamic. (This could be done inside the app, but not ideal.)
Is there something like my-region.<appname>.internal? Or, it is possible to use the FLY_ environment variables inside fly.toml? (Something like $FLY_REGION.<appname>.internal.)
Hi… Almost: top1.nearest.of.<appname>.internal. The difference is that it will reach out to other regions in the corner case when there isn’t actually a local cache Machine alive at the moment.
(This is how database connections were done by default before Flycast was introduced.)