[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: glibc's getaddrinfo() sort order



On Wed, Sep 19, 2007 at 05:08:25AM +1000, Anthony Towns wrote:
> On Tue, Sep 18, 2007 at 07:18:40PM +0100, Ian Jackson wrote:
> > There are only three possibilities:
> > (a) It is correct that the behaviour of applications (and hence of
> >     hosts) should be changed to comply with rule 9.
> > (b) Application behaviour should not change; getaddrinfo should
> >     behave the same way as gethostbyname.
> > (c) Application behaviour should not change but getaddrinfo should
> >     comply with rule 9.  Applications should therefore not be changed
> >     to use getaddrinfo instead of gethostbyname.

> No, there aren't. A fourth possibility is:

>   (d) Applications should use getaddrinfo(), and if the ordering behaviour
>       it uses is not desired, they should use an ordering that is desired.

The ordering rules affect all DNS queries, and the topography of the IPv4
Internet is such that we know this ordering is going to be a wash in the
general case, give pessimal behavior in a subset of cases, and break the
utility of round-robin DNS in the majority of cases where the nodes aren't
all hosted in the same IP assignment.

So do you have a use case where you think the behavior described in rule 9
*is* desirable?

Even if you do have one, I still don't see any reason to think this is a
reasonable default behavior on the real-world Internet.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/



Reply to: