I’m building an application where nodes can coordinate amongst each other. What is the most straightforward way to view a list of the sibling machines?
I see there is an answer here which uses a /machines
api endpoint.
Is this available somewhere else? For example, an environment variable or a URL which does not require a fly api token?
I think of the Hetzner metadata URL as a model.
Ideally, I’d even be able to do this without any fly-specific code, but don’t mind special-casing a check for whether the code is being run via Fly. If I could transparently check for, say, FLY_MACHINE_NAME
and based on that query localhost:1337/application/metadata
then that would allow me to implement this without additional configuration.