Is there an internal DNS entry for an app in the same region?

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.)

Hope this helps!

Thanks @mayailurus, that might be enough so we’ll give it a go.

I’d assumed <appname>.internal would prefer closer instances but I guess not. I’d not looked into the details of Flycast but understand it better now.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.