Overview of dnspyre DNS benchmarking
masterdnstrace, it has been rewritten to provide enhanced functionality for performance measurement.repository·master·Indexed 43 days ago
https://github.com/tantalor93/dnspyreA high-performance command-line DNS benchmarking tool used to stress test DNS servers across various protocols, including UDP, TCP, DoT (DNS over TLS), DoH (DNS over HTTPS), and DoQ (DNS over QUIC). It supports custom query types, load control via concurrency and rate limiting, and result visualization through CLI histograms or exported image formats (png, svg, pdf).
dnstrace, it has been rewritten to provide enhanced functionality for performance measurement.dnspyre is a DNS server benchmarking tool that spawns a configured number of concurrent worker threads. Each worker thread sends DNS queries for specified domains. The benchmark execution terminates when one of the following conditions is met:
--number flag).--duration flag).SIGINT signal.dnspyre provides extensive options to customize how you benchmark DNS servers. Key capabilities include:
A, AAAA, CNAME, HTTPS, etc., using the --type option.--number and --concurrency.--duration.--probability option.--plot option.--plotf option.When the --cookie flag is enabled, dnspyre manages cookies per concurrent worker. Each worker generates a unique 8-byte Client Cookie which is reused for all subsequent requests made by that specific worker:
This mechanism allows dnspyre to maintain stateful cookie exchanges across multiple queries within a single worker's lifecycle.
dnspyre allows you to configure specific timeouts for outgoing DNS requests using CLI flags. These timeouts control different stages of the network lifecycle:
--connect: Sets the timeout for establishing a connection to a DNS server.--write: Sets the timeout for writing a request to a DNS server.--read: Sets the timeout for reading a response from a DNS server.--request: Sets the overall timeout covering the entire lifecycle (connection, sending the request, and reading the response).Timeout values should be provided as duration strings (e.g., 100ms, 1s, 10s).
dnspyre --request 100ms --duration 10s --server 'quic://dns.adguard-dns.com' https://raw.githubusercontent.com/Tantalor93/dnspyre/master/data/1000-domainsTo facilitate automatic processing of benchmark results, use the --json flag. This instructs dnspyre to output the results as a structured JSON object instead of the default text format.
For better readability during manual inspection, you can pipe the output to jq to produce pretty-printed JSON.
# Basic JSON output
dnspyre --duration 5s --server 8.8.8.8 google.com --json
# Pretty-printed JSON output using jq
dnspyre --duration 5s --server 8.8.8.8 google.com --no-distribution --json | jq '.'Use the --rate-limit-worker flag to set a rate limit that applies separately to each individual concurrent worker. Unlike the global --rate-limit flag, this ensures that every worker spawned by the --concurrency (or -c) flag maintains its own independent query-per-second limit, resulting in more predictable and even load generation across all workers.
dnspyre --duration 10s -c 10 --rate-limit-worker 1 --server '8.8.8.8' google.comWhen running dnspyre in concurrent mode (--concurrency > 1), all workers generate identical queries by default. This can lead to unrealistic results because most queries will be served from the cache.
To simulate real-life scenarios and prevent cache-heavy results, use the --probability flag with a value less than 1. This randomizes the queries fired by each concurrent thread. For example, setting --probability 0.33 ensures that each thread uses roughly every third hostname from your data source, creating a more arbitrary and realistic random load.
dnspyre --duration 30s -c 10 --server 8.8.8.8 -t A -t AAAA https://raw.githubusercontent.com/Tantalor93/dnspyre/master/data/1000-domains --probability 0.33Once you have defined your dnspyre-deployment.yml file, apply it to your cluster using kubectl apply.
kubectl apply -f dnspyre-deployment.ymlAfter running a dnspyre pod, use the kubectl logs command to view the performance output and results.
kubectl logs dnspyre