erldns_query_throttle (erldns v13.0.0)

View Source

Stateful throttling of RRSIG queries over UDP.

An RRSIG query draws every signature at the name, so a small query to a spoofed address can draw a large answer. A client over the limit gets an empty, truncated answer, and retries over TCP. ANY queries are answered minimally instead, see erldns_resolver.

Configuration

{erldns, [
    {query_throttle, #{
        enabled := boolean(), %% defaults to true
        limit := non_neg_integer(), %% Number of queries to allow, defaults to 1
        ttl := non_neg_integer(), %% Seconds, defaults to 30
    }}
]}

Telemetry events

[erldns, pipeline, throttle]

Emitted when the query throttle pipe stops the request (e.g. UDP client over limit); response is truncated.

  • Measurements: #{count => non_neg_integer()} — request count that triggered throttle
  • Metadata: #{transport => udp, host => host()}

Summary

Functions

call/2

erldns_pipeline:call/2 callback.

clear()

-spec clear() -> true.

Clear the cache

prepare(Opts)

-spec prepare(erldns_pipeline:opts()) -> disabled | erldns_pipeline:opts().

erldns_pipeline:prepare/1 callback.