[zeromq-dev] automatically choosing a free TCP port

David Robinson zxvdr.au at gmail.com
Mon Mar 15 15:36:30 CET 2010

>> Fair enough! We've been discussing this scenario, thinking more of DNS
>> as a provider of routing info...
> FYI, see this thread for the proposal on locating services via DNS:
> http://lists.zeromq.org/pipermail/zeromq-dev/2010-January/001807.html

Interesting... fwiw the simple static file that was proposed is quite
similar to what avahi uses for static DNS-SD service data. Here's what
was proposed:

  <service name = "feed1">
    <connect addr = "tcp://" />
    <!-- for failover -->
    <connect addr = "tcp://" />
    <!-- for services binding to this name as opposed to connecting -->
    <bind addr = "tcp://eth0:5555" />

and here's what avahi has sitting in /etc/avahi/services/ssh.service on my pc:

  <name replace-wildcards="yes">%h</name>

iirc the 169.254. IP addresses are for multicast DNS. I suspect DNS-SD
could be used without multicast DNS and that would give at least half
a solution.

I'll see if I can find some time to investigate this further. It may
end up that avahi doesn't meet my needs wrt playing nicely in HA (like
what was mentioned before about restarting on a different port).


More information about the zeromq-dev mailing list