Subject: Re: Adding TTL information to gethostbyname() and friends
To: NetBSD Networking Technical Discussion List <tech-net@NetBSD.ORG>
From: Ian Lance Taylor <ian@airs.com>
List: tech-net
Date: 06/03/2003 12:57:14
"Greg A. Woods" <woods@weird.com> writes:

> I would like to see evidence of just how wrongly implemented existing
> browser DNS caches are.  For example do they really violate the de facto
> minimum TTL of 300 seconds?

Mozilla used to always use a 30 minute TTL, then changed to 15
minutes, and now always uses 5 minutes.  Use the source.

When I tested IE a couple of years ago on Windows 98, it used a 15
minute TTL.  I don't know whether this has changed.

> > Wrong.  If the browser is too slow, the user blames the browser.  The
> > browser writers may be willing to use a local cache, but they will
> > require some way to tell that there is a local cache.
> 
> If the system the browser runs on is using fully RFC 1123 compliant DNS
> resolvers then the browser will not be too slow just because it's doing
> too many long-latency DNS lookups.  The browser authors will be using a
> "local" cache if the underlying platforms are fully RFC 1123 compliant.

We are talking past each other.  I understand what you are saying, but
I see no reason to continue to repeat myself.

> Why do you want to make it easier for OS vendors to force more work and
> more hacks on every application instead of following the original design
> and doing it right at the right levels in the first place?  Why do you
> want to condone the current hacks of those applications which have
> already violated the cache layering laid out by RFC 1123?

Because I am interested in fixing an actual problem.  I'm not
interested in promoting some fantasy.

> Regardless any properly functioning resolver need only know the address
> of one lone functioning and reachable root server in order to re-prime
> its root cache.  Your argument that the root cache needs frequent
> updating is a straw man -- updates by OS vendors are more than
> sufficient even given the tendency of ordinary people to not upgrade
> their systems very often.  There will likely never ever be a critical
> change to the root cache.

I already conceded this point in my last message.


Looking at this argument as a whole, I don't understand your overall
point.  I am suggesting that applications should have an interface
which translates host names to IP addresses, which supports
/etc/hosts, NIS, and DNS, and which makes the DNS TTL available.  You
seem to be saying that such an interface is a bad idea.  Why is it
better to hide the TTL?  That is not the Unix way as I see it.

I understand your point about how it would be better if every system
ran a correct DNS cache.  I know that.  But even so, that does not
explain why it is better to hide the TTL.

Ian