[avahi] Is there a way to set up Avahi to implement “anycast name resolution” on a LAN?

Jeremy Friesner jaf at meyersound.com
Thu Jun 2 18:30:24 PDT 2011


Hi all,

First, some background: We've got a lab containing a handful of dedicated Linux servers that run on an isolated LAN. All the servers run the same OS (Debian Linux) and the same proprietary server software, and the server processes communicate with each other to keep their data in sync. That means that as far as any clients are concerned, it doesn't matter which server the client connects to -- any server will return the same data as any other.

These Linux servers all run avahi-daemon to publish mDNS hostnames for themselves, which means that a client can enter e.g. "http://linux-server-1.local." into his web browser and connect to Linux server #1, and so on.

This is all well and good, except it means that a user sitting at the client machine (typically a Mac or Windows laptop with Bonjour installed) has to know (or figure out) which of the Linux servers are currently online, and he has to make sure he connects to one of those. For example, if server #2 is offline today, and the client enters "http://linux-server-2.local." into his URL bar, he's not going to get a response. That isn't the end of the world, of course, but it is annoying for newbie users who expect everything to "just work", and also it makes the development of robust client-side scripting more complicated (since the client-side script would need to know how to deal with offline servers explicitly).

With that in mind, my question is this: is it possible to configure Avahi to publish an anycast-style mDNS hostname alias as well? The goal is that anyone could sit down with his laptop, enter "http://any-linux-server.local." (or similar) into his web browser, and get a response from one of the servers that is currently on line (again, it doesn't matter which one).

Note that this needs to work without any special configuration of client laptops, as we have no control over them (other than the requirement that they have Bonjour installed).

Also note that we can't rely on the presence of a separate nameserver or proxy box, or on the presence of any particular Linux server, since that would introduce a single point of failure, which we're trying to avoid.

Thanks,
Jeremy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/avahi/attachments/20110602/4dc2a73b/attachment.html>


More information about the avahi mailing list