Documentation → BoronGun

BoronGun

BoronGun is a high-rate DNS load generator designed for testing authoritative nameservers under realistic conditions. Use it to validate capacity, measure latency distributions, and verify that BoronDNS (or any authoritative server) holds up before attackers find out.

Overview

BoronGun sends DNS queries at a configurable rate and measures responses. Key capabilities:

  • High rate — sustains millions of QPS per instance on commodity hardware
  • Realistic query mix — replay pcap captures or generate queries from zone contents
  • Multiple transports — UDP, TCP, and DNS-over-TLS
  • Detailed output — per-rcode counters, latency histograms, and Prometheus metrics
  • Flood mode — fixed-rate or unlimited burst for capacity testing

BoronGun is a self-use tool. Only target infrastructure you own or have explicit written permission to test.

Installation

cargo install borongun

Or download a prebuilt binary from /downloads/.

Quick start

Send 10 000 queries at 1 000 QPS to a nameserver:

borongun shoot \
  --target 10.0.0.1:53 \
  --zone example.com \
  --rate 1000 \
  --count 10000

Output:

borongun 0.4.0  target: 10.0.0.1:53  transport: UDP

queries sent:     10 000
responses:        9 998  (99.98%)
  NOERROR:        9 901
  NXDOMAIN:         97
  SERVFAIL:          0
  timeout:           2

latency (ms):
  p50:    0.81
  p95:    2.14
  p99:    4.07
  p99.9:  11.2
  max:    18.4

rate:  998.7 qps (target: 1000)

Shot configuration

Shots are defined in a TOML file for reproducible runs:

# shot.toml

[target]
address   = "10.0.0.1:53"
transport = "udp"        # udp | tcp | dot

[load]
rate       = 5000        # queries per second (0 = unlimited)
count      = 0           # total queries (0 = run until Ctrl-C)
duration   = "60s"       # stop after this duration (overrides count)
concurrency = 128        # max outstanding queries

[query]
# Source query names from the zone's A/AAAA records
zone    = "example.com."
types   = ["A", "AAAA", "MX", "TXT"]
# Mix in random NXDOMAINs to test negative-answer handling
nxdomain_ratio = 0.05

[output]
format   = "text"         # text | json | prometheus
interval = "5s"           # report interval during the run
histogram_buckets = [0.5, 1, 2, 5, 10, 25, 50, 100]  # ms

Run with:

borongun shoot --config shot.toml

Replay mode

Replay a packet capture to reproduce a real traffic pattern:

borongun replay \
  --pcap /path/to/traffic.pcap \
  --target 10.0.0.1:53 \
  --speed 1.0

--speed 2.0 replays at twice the original rate. The pcap must contain DNS query packets; responses in the capture are ignored.

Flood mode

Flood mode sends as fast as the NIC and kernel allow, ignoring --rate:

borongun flood \
  --target 10.0.0.1:53 \
  --zone example.com \
  --duration 30s

Use flood mode for absolute capacity testing. Monitor your target's CPU, packet drop counters, and SERVFAIL rate during the test.

Output formats

Text (default)

Human-readable summary printed every --interval seconds and at the end of the run.

JSON

borongun shoot --config shot.toml --output json
{
  "ts": "2026-06-15T10:30:00Z",
  "queries_sent": 50000,
  "responses": {
    "NOERROR": 49750,
    "NXDOMAIN": 234,
    "SERVFAIL": 0,
    "timeout": 16
  },
  "latency_ms": {
    "p50": 0.9,
    "p95": 2.3,
    "p99": 4.8
  },
  "rate_qps": 4998.2
}

Prometheus

Expose a scrape endpoint during the run:

[output]
format          = "prometheus"
metrics_listen  = "127.0.0.1:9091"

Metric names follow the borongun_ prefix.

CLI reference

borongun shoot   [--config FILE] [--target HOST:PORT] [--zone ZONE]
                 [--rate QPS] [--count N] [--duration DUR]
                 [--transport udp|tcp|dot] [--output text|json|prometheus]

borongun flood   [--target HOST:PORT] [--zone ZONE] [--duration DUR]

borongun replay  [--pcap FILE] [--target HOST:PORT] [--speed FLOAT]

borongun report  [--input JSON_LOG] [--format text|json|html]

Interpreting results

MetricHealthy rangeAction if outside
Timeout rate< 0.01%Check network path, server CPU
SERVFAIL rate0%Investigate server logs
p99 latency< 10 msCheck CPU, zone size
Achieved rate vs target> 98%Check client NIC, CPU

A rising SERVFAIL rate under load typically indicates the server is dropping packets, exhausting file descriptors, or failing zone lookups. Cross-reference with BoronDNS's Prometheus metrics during the test.

Product page

For pricing, managed load-testing services, and enterprise support, see the BoronGun product page.