Orchestrate instance name for NATS clusters in a fly.io friendly way?

A TXT nslookup on vms.<appname>.internal should get you a csv of alloc-ids assigned to <appname> (docs). Though, it may not always be current, it mostly should converge eventually to whatever’s the current state of the world.

Btw, one can assign volumes to VMs to make the alloc-ids stick across restarts / deploys, but it is a rather expensive way to do so. And: Machine VMs tend to be fixed on a single IPv6 (not sure about alloc-id, though). More here: Fly-Instance-Id header alternative for websockets - #2 by ignoramous

1 Like