Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'lookupd cache vs caching' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
lookupd cache vs caching
Authored by: dlandrith on Dec 21, '01 06:51:23PM
For the record: I'm very envious of your dual 800 G4....

There are basically four key differences between Caching DNS and lookupd (there are actually more, but you'd have to read DNS and BIND to understand them). They basically add up to the fact that lookupd's caching mechanism is rather rudimentary compared to bind's. At any rate, the key differences are as follows:


  1. lookupd arbitrarily caches DNS entries for 12 hours (unless you set it to go longer). A caching DNS will store a cached entry as long as the SOA record allows. This will be at least 24 hours (the default value) in 99.9% of entries (admins typically make it shorter only when a key change is imminent, in which case you don't want the cache to be held longer). In practice, many admins set this to about 2 weeks. If your uptime is greater than 12 hours, you will experience some speed increase, albeit slight.
  2. lookupd has no cache validation for DNS queries. This means that if the entry expires and is changed in the meantime, you'll have to issue do a lookupd -flushcache to get a correct resolution. The configuration that I have given doesn't solve this problem, because it leaves the lookupd cache setting alone. However, it does allow you to configure lookupd so that the DNS entries are not cached at all and thereby overcome this problem.
  3. lookupd flushes its cache whenever it is gets a SIGHUP, which is to say, whenever any part of the network is reconfigured. Bind runs independently of the system and so resetting the network has no direct effect on it.
  4. As a matter of practice, lookupd often does not communicate its information across applications correctly. For example, you may find that Fetch and Internet Explorer both spend time looking up the same address within minutes of each other. I am not sure why this happens on MacOS X (it happens on AIX, Solaris, and Linux as well). Theoretically, it shouldn't . At any rate, it doesn't happen with bind.


Granted, these are not large differences, but this is why I stated at the outset that this is a slight optimization. I did it on my machine because I was interested in tooling around with the new version (v. 9) of bind. Once I completed it, I figured it would be fun to share.

As for flumingan and his rolling eyes (see previous reply): The pedantic tone of his email is more consistent with one who "existed in the UNIX[sic]-world and ... know[s] a few tricks" than he realizes. If he had read more than the first paragraphs of the man page for lookupd, then he'd have known at least the first three of the above four items. At any rate, he'll do well not to openly flaunt run-of-the-mill Unix knowledge as though it were proof that he knows the secrets of the universe; it makes him look silly.

[ Reply to This | # ]