Score:0

How do you profile DNS response times on CentOS8?

cn flag

I would like to know how long exactly takes a DNS response to resolve an address - so I can compare different servers (my machine (I use named), GCP DNS, other public DNS servers).

The problem is that my app needs to resolve a URL which IP has just changed inside a CDN (e.g. Cloud Flare). And I need this resolve to be as fast as possible.

So I would like to collect statistics on how fast are different DNS servers can resolve a URL to new IP.

Score:1
us flag

Wireshark can provide you DNS statistics on response times.

But it sounds like what you're really asking is something like "If example.com changes their IP address, what service will reflect that new IP the fastest?" If that really is the question, then the bad news is ALL of them are going to be highly dependent on the TTL example.com uses and caching by whatever DNS service is retrieving the RR from the authoritative servers.

TLDR: You may find no significant difference.

EDIT: Steps to analyzing DNS statistics with Wireshark:

  1. Collect some sample data using tcpdump

    tcpdump -i<interface-name-or-"any"-keyword> -vn -s0 -w somefilename.pcap port 53

  2. Hit control-C when you have collected enough sample data

  3. If necessary scp/sftp somefilename.pcap to a machine with Wireshark. It does NOT have to be run on the same machine.

  4. Open the file in Wireshark:

    wireshark somefilename.pcap

  5. Go to Statistics->DNS

Boppity Bop avatar
cn flag
wireshark seems complicated without UI.. gonna try. thanks. so by your logic - the DNS server of the CDN which changes the IP in question - is going to be **always** the fastest then?
Brandon Xavier avatar
us flag
That is correct - the authoritative DNS servers for the CDN by definition will have the most current DNS info. Also, Wireshark is very simple - I'll edit my answer with some steps.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.