DNS zone response speed test tool?

2011-12-20 Thread Jay Ashworth
I've put monitoring onto my public website, and by far the largest component
of the response time it gives me is the DNS lookup -- 4-500ms, which seems
entirely unreasonable.

Is there a tool that anyone knows about that will measure the response time
of my zone servers, somewhere on the web?

Is the sum of the times in a dig +trace the proper metric to look at there?

Cheers,
-- jra
-- 
Jay R. Ashworth  Baylink   j...@baylink.com
Designer The Things I Think   RFC 2100
Ashworth  Associates http://baylink.pitas.com 2000 Land Rover DII
St Petersburg FL USA  http://photo.imageinc.us +1 727 647 1274



Re: DNS zone response speed test tool?

2011-12-20 Thread Stephane Bortzmeyer
On Tue, Dec 20, 2011 at 10:10:08AM -0500,
 Jay Ashworth j...@baylink.com wrote 
 a message of 16 lines which said:

 Is there a tool that anyone knows about that will measure the
 response time of my zone servers, somewhere on the web?

Yes, it is called Nanog.

For baylink.com ? Only one real name server and quite slow.

% qtest -n 10 SOA baylink.com $(dig +short NS baylink.com.)   
148 ns5.baylink.com./69.12.222.27
149 ns6.baylink.com./69.12.222.27
#!/bin/sh
#
# qtest: queries a set of DNS name servers and report the fastest ones
# 
# Usage: qtest query server...
# Example: qtest -n 3 SOA fr $(dig +short NS fr.)
#
# From: Joe Abley jab...@isc.org
# Modified-by: Stephane Bortzmeyer bortzme...@nic.fr

# Settings 
max=1
verbose=0

# Some Unices like NetBSD are crazy enough to ship a dinosaurian
# version of getopt, which cannot handle arguments with spaces! So, we
# have a lot of work to work around this pre-babylonian limit.
test_getopt() 
{
getopt=$1
if [ ! -x $getopt ]  ! which $getopt  /dev/null 21; then
return 1
fi
if [ $($getopt -o '' -- 'a b') =  -- 'a b' ]; then
return 0
else
return 1
fi
}
if test_getopt getopt; then
GETOPT=getopt
else 
if test_getopt ggetopt; then
GETOPT=ggetopt
else 
if test_getopt /usr/pkg/bin/getopt; then # Last resort for NetBSD
GETOPT=/usr/pkg/bin/getopt
else
echo Cannot find a working getopt on this machine   /dev/stderr
exit 1
fi
fi
fi

TEMP=$($GETOPT -o n:v -- $@)
if [ $? != 0 ]; then
echo Usage: $0 [-n MAX] [-v] query server...  /dev/stderr
exit 1
fi
eval set -- $TEMP
while true ; do
case $1 in
-n) max=$2; shift 2;;
-v) verbose=1; shift;;
--) shift ; break ;;
*) echo Internal error!  /dev/stderr ; exit 1 ;;
esac
done

query=$1
shift
servers=
for server in $*; do
addresses=$(dig +short A $server ; dig +short  $server)
if [ -z $addresses ]; then # Let's hope it was an IP address
addresses=$server
fi
for address in $addresses; do
servers=$servers $server/$address
done
done
for i in 0 1 2; do
 for server in $servers; do
 address=$(echo $server | cut -d/ -f 2)
 # TODO: if the box has no IPv6 connectivity, or if it is an
 # old dig without IPv6, we get something like dig: couldn't
 # get address for '2001:4f8:0:2::8': address family not
 # supported. Should we do something?
 echo TEST: $server
 dig @${address} ${query}
 done
done | \
   awk '/^TEST: / { server = $2; } \
 /^;; Query time:/ { query_time = $4; } \
 /^;; SERVER: / { sum[server] += query_time; num[server]++; } \
 END { for (ns in sum) { print int(sum[ns]/num[ns]), ns; } }' | \
   sort -n | head -${max}



Re: DNS zone response speed test tool?

2011-12-20 Thread chip
http://code.google.com/p/namebench/
  Seems like it may be fun to play with





On Tue, Dec 20, 2011 at 10:10 AM, Jay Ashworth j...@baylink.com wrote:
 I've put monitoring onto my public website, and by far the largest component
 of the response time it gives me is the DNS lookup -- 4-500ms, which seems
 entirely unreasonable.

 Is there a tool that anyone knows about that will measure the response time
 of my zone servers, somewhere on the web?

 Is the sum of the times in a dig +trace the proper metric to look at there?

 Cheers,
 -- jra
 --
 Jay R. Ashworth                  Baylink                       
 j...@baylink.com
 Designer                     The Things I Think                       RFC 2100
 Ashworth  Associates     http://baylink.pitas.com         2000 Land Rover DII
 St Petersburg FL USA      http://photo.imageinc.us             +1 727 647 1274




-- 
Just my $.02, your mileage may vary,  batteries not included, etc



Re: DNS zone response speed test tool?

2011-12-20 Thread Todd Lyons
Doesn't do much for long term graphing and monitoring, but for quickie
issue detection or verification, http://www.grc.com/dns/benchmark.htm

...Todd

On Tue, Dec 20, 2011 at 8:00 AM, chip chip.g...@gmail.com wrote:
 http://code.google.com/p/namebench/
  Seems like it may be fun to play with





 On Tue, Dec 20, 2011 at 10:10 AM, Jay Ashworth j...@baylink.com wrote:
 I've put monitoring onto my public website, and by far the largest component
 of the response time it gives me is the DNS lookup -- 4-500ms, which seems
 entirely unreasonable.

 Is there a tool that anyone knows about that will measure the response time
 of my zone servers, somewhere on the web?

 Is the sum of the times in a dig +trace the proper metric to look at there?

 Cheers,
 -- jra
 --
 Jay R. Ashworth                  Baylink                       
 j...@baylink.com
 Designer                     The Things I Think                       RFC 
 2100
 Ashworth  Associates     http://baylink.pitas.com         2000 Land Rover 
 DII
 St Petersburg FL USA      http://photo.imageinc.us             +1 727 647 
 1274




 --
 Just my $.02, your mileage may vary,  batteries not included, etc




-- 
If Americans could eliminate sugary beverages, potatoes, white bread,
pasta, white rice and sugary snacks, we would wipe out almost all the
problems we have with weight and diabetes and other metabolic
diseases. -- Dr. Walter Willett, Harvard School of Public Health



Re: DNS zone response speed test tool?

2011-12-20 Thread Jay Ashworth
- Original Message -
 From: Todd Lyons tly...@ivenue.com

 Doesn't do much for long term graphing and monitoring, but for quickie
 issue detection or verification, http://www.grc.com/dns/benchmark.htm

Am I mistaken in thinking that's a tool for measuring the efficiency and
accessibility of *customer resolver* servers, not zone servers?

Cheers,
-- jra
-- 
Jay R. Ashworth  Baylink   j...@baylink.com
Designer The Things I Think   RFC 2100
Ashworth  Associates http://baylink.pitas.com 2000 Land Rover DII
St Petersburg FL USA  http://photo.imageinc.us +1 727 647 1274



Re: DNS zone response speed test tool?

2011-12-20 Thread Todd Lyons
On Tue, Dec 20, 2011 at 2:21 PM, Jay Ashworth j...@baylink.com wrote:

 Doesn't do much for long term graphing and monitoring, but for quickie
 issue detection or verification, http://www.grc.com/dns/benchmark.htm
 Am I mistaken in thinking that's a tool for measuring the efficiency and
 accessibility of *customer resolver* servers, not zone servers?

Oops, yeah, I was thinking it would do timing of zone servers, but
it's aimed at resolvers.  Sorry for the misdirection.

...Todd
-- 
If Americans could eliminate sugary beverages, potatoes, white bread,
pasta, white rice and sugary snacks, we would wipe out almost all the
problems we have with weight and diabetes and other metabolic
diseases. -- Dr. Walter Willett, Harvard School of Public Health