Access to a local DNS server is always delayed by ~1 second.
I enabled the DNS server on OS-X Lion and it does indeed work. However when I query it using 'dig' (or nslookup) there is a delay of about 1 second before the reply is given. This delay is not reported by 'dig', which gives a response time of 0ms.
So for example a query using the OpenDNS servers completes sooner than one to the local server despite the name resolution taking 135ms longer:
$ time dig @208.67.220.220 ibm.com
;; Query time: 135 msec
real 0m0.172s user 0m0.008s sys 0m0.006s
$ time dig @localhost ibm.com
;; Query time: 0 msec
real 0m1.068s user 0m0.009s sys 0m0.007s
The delay does not seem to be in the named server, as when using named -g to view logs there is also a 1s delay before the request is printed.
FYI: my changes to enable DNS were:
rndc-confgen -b 256 > /etc/rndc.conf
head -n5 /etc/rndc.conf | tail -n4 > /etc/rndc.key
edit /etc/rndc.conf to correct port number
edit /etc/named.conf to add this to the options:
forward first;
forwarders {
208.67.222.222;
208.67.220.220;
};
run named from the shell (/usr/sbin/named -g)