Search code examples
pythondnstwisted

twisted names and srv records


I'm working on a distributed Twisted application where many twistd-initiated processes will discover one another. I'm considering UDP multicast and DNS for service discovery.

On the DNS front, I found Twisted's Names submodule. The client supports lookupService, but doesn't seem to support updating SRV records.

Is there a Twisted-friendly way to do this?


Solution

  • If you want to use multicast DNS, you need to cooperate with your operating system's DNS service discovery mechanism. Unfortunately, this means that Twisted can't really be the thing speaking the multicast DNS (which is why Twisted Names hasn't bothered with a multicast implementation - you'd have to hand-craft an operating system distribution to use it).

    You could try txbonjour, which integrates with system mDNS via pybonjour.