Subject: Re: non-DNS name services

From: Keith Moore <[email-masked]>
Date: Wed, 28 Aug 2002 11:44:47 -0400

> >- YP could return inconsistent results from DNS both in obvious ways
> >(different name-to-address bindings) and subtle ways (canonical name
> >for an address might be an FQDN in one case and not in another).
> >this could result in different hosts in a conversation having
> >different views of "DNS" (i.e. host name<>address mapping) and
> >causing things to break in subtle ways.
> 
>         this is no different from having entry different from DNS in /etc/hosts.
>         i don't see the point.

the existence of one source of error does not justify introducing another.

> >- failure modes were different: a host could wait indefinitely on YP
> >binding when a DNS query would have timed out - this could cause
> >failures for applications that were time-critical. (to some degree
> >this was a result of overloading the gethostbyname interface to do
> >DNS queries rather than local-file lookup - hence the clunky h_errno
> >hack - which was at first only supported for DNS queries)
> 
>         timeout behavior is different between NIS and DNS, that's all.
>         i can't say that DNS timeout behavior is *the* right behavior,
>         nor NIS.

it wasn't just a difference in the delay before timing out, it was
a difference in the way errors were reported.  and under some conditions
(ypbind failure) YP lookups would not time out at all.

>         from my experience, i have to disagree.  NIS worked just fine.
>         maybe your NIS configuration was incorrect/corrupted.

after lots of pulling our hair out we decided that "correct" configuration
of NIS was to completely disable it for hostname lookups (even when that
meant patching libc.so).   we've had very few problems with it since then :)  

(though not zero - I remember one problem that resulted from 
getservbyname ("smtp", "tcp") returning NULL due to a ypbind failure.  
it makes *zero* sense to use a network-based service to look up a well-known 
constant.  I replaced that line with htons(25) and it's worked fine ever since :)

Keith