Simple TCP/IP DNS benchmarking tool

In our work, we frequently find that we need tools to do specific tests. Today, because of a query from one of our users, we wrote a new tool to cover such a need: TCP DNS benchmarking.

It is not very sophisticated, but it does the job. We’ve learned that PowerDNS does around 20000 TCP/IP queries/second out of the box on a few years old server, a number we did not previously know.

From the manpage:

dnstcpbench reads DNS queries from standard input and sends them out
in parallel to a remote nameserver. By default TCP/IP is used, but
optionally, UDP is tried first, which allows for the benchmarking of
TCP/IP fallback.

The input format is one query per line: qname single-space qtype. An
example: ANY MX

You can read the manual page on GitHub.

The tool is included in our GitHub master branch.

Here are the build dependencies for Debian 7:

apt-get install autoconf automake bison flex g++ libboost-all-dev libtool
make pkg-config ragel

To compile:

$ git clone
$ cd pdns
$ ./bootstrap
$ ./configure --with-modules="" --without-lua
$ cd pdns
$ make dnstcpbench

Good luck & please let us know your thoughts & suggestions!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s