[150573] in North American Network Operators' Group

home help back first fref pref prev next nref lref last post

Re: dns and software, was Re: Reliable Cloud host ?

daemon@ATHENA.MIT.EDU (Owen DeLong)
Mon Feb 27 19:10:50 2012

From: Owen DeLong <owen@delong.com>
In-Reply-To: <CAP-guGVA4eHv0K=U=x2B-WPYDy2RQ7ZE1Di2AHc+dmA_huyGzA@mail.gmail.com>
Date: Mon, 27 Feb 2012 16:07:26 -0800
To: William Herrin <bill@herrin.us>
Cc: Nanog <nanog@nanog.org>
Errors-To: nanog-bounces+nanog.discuss=bloom-picayune.mit.edu@nanog.org


On Feb 27, 2012, at 3:50 PM, William Herrin wrote:

> On Mon, Feb 27, 2012 at 3:43 PM, david raistrick =
<drais@icantclick.org> wrote:
>> On Mon, 27 Feb 2012, William Herrin wrote:
>>> In some cases this is because of carelessness: The application does =
a
>>> gethostbyname once when it starts, grabs the first IP address in the
>>> list and retains it indefinitely. The gethostbyname function doesn't
>>> even pass the TTL to the application. Ntpd is/used to be one of the
>>> notable offenders, continuing to poll the dead address for years =
after
>>> the server moved.
>>=20
>> While yes it often is carelessness - it's been reported by hardcore
>> development sorts that I trust that there is no standardized API to =
obtain
>> the TTL...  What needs to get fixed is get[hostbyname,addrinfo,etc] =
so
>> programmers have better tools.
>=20
> Meh. What should be fixed is that connect() should receive a name
> instead of an IP address. Having an application deal directly with the
> IP address should be the exception rather than the rule. Then, deal
> with the TTL issues once in the standard libraries instead of
> repeatedly in every single application.
>=20
> In theory, that'd even make the app code protocol agnostic so that it
> doesn't have to be rewritten yet again for IPv12.
>=20

While I agree with the principle of what you are trying to say, I would =
argue
that it should be dealt with in getnameinfo() / getaddrinfo() and not =
connect().

It is perfectly reasonable for connect() to deal with an address =
structure.

If people are not using getnameinfo()/getaddrinfo() from the standard =
libraries,
then, I don't see any reason to believe that they would use connect() =
from the
standard libraries if it incorporated their functionality.

Owen



home help back first fref pref prev next nref lref last post