Metadata based DNS routing


Querying dns for AAAA value.key.kv._metadata.appname.internal will return all of the ips of machines that have the key:value pair set in metadata from the appname app.

Why did we build this

When running different databases with distributed architectures on Fly (see vitess, for example), we would often run into the problem that there might be different machines in the same app which have different roles. Up until now, even though you could set metadata on machines there was no useful way to consume it from inside your application. We’ve been working on new ways to solve this problem. First we introduced: Dynamic machine metadata, now we are hooking it up to DNS, and soon it will be hooked up to fly-proxy as well.

What can you do with this?

  • Run machines with different roles in one app, and make them easily able to address each other
  • Simplify your configuration by storing deploy info in metadata and retrieving it later (you could do something cool with this like build your own bluegreen deploys maybe)
  • Much more. Let us know what you build!


Ask away!


This feature solved a lot of headache. It would be nice to also query only by existence of key like: key.kv._metadata.appname.internal