Authoritative DNS performance - sandeeprenjith/dnsblast GitHub Wiki

Authoritative DNS performance testing usually shows the maximum performance that a DNS server can output.

To test authoritative DNS performance, the domain names queried must match the records that exist in the authoritative zones on the server.

Note: At the time of writing this, only A record queries are supported by the tool.

The first step of the test is creating an input file with the domain names to query. The file should have domain names or QNAMEs that the server can answer authoritatively. Each line should have one FQDN(fully qualified domain names).

The query file would look like the below.

a.test.com
b.example.com
c.foo.org
d.test.edu

Use the "-f" flag of the tool to point to the file with the FQDNs.

Below is an example.

In my example, I am using BIND as a nameserver. My BIND configuration file (named.conf) would have the below zone definition.

zone "test.com" {
    type master;
    file "/etc/bind/test.com.db";
};

The zone file "/etc/bind/test.com.db" would look as below.

$TTL 86400;
$ORIGIN test.com.
@       1D      IN      SOA ns1.        sandeep.renjith.gmail.com.      (
                1;
                3H;
                15;
                1w;
                3h;
                )

        IN NS ns1.      ;
ns1.    IN A 192.168.130.9;
a IN A 1.1.1.1
b IN A 2.2.2.2
c IN A 3.3.3.3
d IN A 4.4.4.4
e IN A 5.5.5.5

With this info the input file would look as below. I named the file "test.txt"

a.test.com
b.test.com
c.test.com
d.test.com
e.test.com

Finally we test the performance with DNSBlast.

$ ./dnsblast -s 192.168.130.9 -f ~/test.txt -l 10 -r 50000 -q 100

EXECUTING TEST
+-----------------------------------------------------------+
2020/03/17 22:37:38 QPS/Thread:  7000  Latency:  6.832853ms
2020/03/17 22:37:39 QPS/Thread:  6500  Latency:  15.432915ms
2020/03/17 22:37:40 QPS/Thread:  6000  Latency:  24.932632ms
2020/03/17 22:37:41 QPS/Thread:  6400  Latency:  30.700442ms
2020/03/17 22:37:42 QPS/Thread:  12600  Latency:  19.908129ms
2020/03/17 22:37:43 QPS/Thread:  12500  Latency:  24.453131ms
2020/03/17 22:37:44 QPS/Thread:  12200  Latency:  29.518858ms
2020/03/17 22:37:45 QPS/Thread:  12400  Latency:  33.476925ms
2020/03/17 22:37:46 QPS/Thread:  12300  Latency:  38.154368ms
2020/03/17 22:37:47 QPS/Thread:  12100  Latency:  43.345018ms
+-----------------------------------------------------------+

  REPORT
+---------------------+------------------------+
| Target Server       | udp://192.168.130.9:53 |
| Test                | Queries from file      |
| Send Rate           | 50000 Queries/Sec      |
| Threads             | 2                      |
| Duration of test    | 10 Sec                 |
| Protocol            | UDP                    |
| Average Queries/Sec | 20000                  |
| Average Latency     | 26.675527ms            |
+---------------------+------------------------+

Note: This is a tiny Ubuntu VM running on Virtualbox. In real scenarios, the concurrent queries (-q) and rate (-r) should be tweaked to reflect approximate server capability