Load Testing DNS using DNSPerf

In this article we will discuss load testing DNS using DNSperf

When i was setting up my internal DNS servers, I wanted to know how much requests my server can handle. As my DNS server is authoritative DNS server, i decided to go with popular tool “Dnsperf” for load testing . Dnsperf is a DNS server performance testing tool. It is primarily intended for measuring the performance of authoritative DNS servers.

Requirements

1. One DNS server , you will run tests against it. I used BIND server with some internal DNS name configured in the zone.
2. DNSperf installation : It can be on same server or on a different machine.

How to configure  the DNS zone?

To run DNS test , you need to have a large number of unique DNS names like aaa.yourdomain.com, xyz.yourdomain.com , xdz.yourdomain.com ..

Intead of creating these individual DNS records, i created a wild card DNS entry in the zone file

Above line has to be at the end of the zone file. Now server will respond to any requests for your domain, with the result “192.168.1.28”

Now let us see how to run tests against the new zone

To run the tests, we need to provide “input” file. A Dnsperf input file should contain a large and realistic set of queries, on the order of ten thousand to a million. The input file contains one line per query, consisting of a domain name and an RR type name separated by a space. The class of the query is implicitly IN.

Let us create a simple input file with following command

Contents of the file would be like this

Now we will run a simple test against the DNS server running on 127.0.0.1 using the file n.txt

From the result you can see that “Queries per second:   68949.535215” . You can get better throughputs with multiple clients using “-c” option. 

There are more commandline options are there , please check the documentation at here

These numbers will give you a fair idea on how much DNS requests your hardware can handle and this will help you while selecting the server/hardware configuration for DNS servers. 

As always, feel free to drop us a note if you have any queries or feedbacks using our comment form below. Always happy to help you ????

One thought on “Load Testing DNS using DNSPerf

  • April 17, 2017 at 5:51 pm
    Permalink

    How this tool is different than Jmeter tool ?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *