How do you profile DNS response times on CentOS8?

Solution 1:

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