}
const auto& config = dnsdist::configuration::getImmutableConfiguration();
- const auto udpTimeout = config.d_udpTimeout;
+ const auto udpTimeout = d_config.udpTimeout ? d_config.udpTimeout : config.d_udpTimeout;
if (config.d_randomizeIDsToBackend) {
auto map = d_idStatesMap.lock();
for (auto it = map->begin(); it != map->end(); ) {
backendConfig.mustResolve = hcConf.must_resolve;
backendConfig.maxCheckFailures = hcConf.max_failures;
backendConfig.minRiseSuccesses = hcConf.rise;
+ backendConfig.udpTimeout = config.udp_timeout;
getLuaFunctionFromConfiguration<DownstreamState::checkfunc_t>(backendConfig.checkFunction, hcConf.function, hcConf.lua, hcConf.lua_file, "backend health-check");
{"newQPSLimiter", true, "rate, burst", "configure a QPS limiter with that rate and that burst capacity"},
{"newRemoteLogger", true, "address:port [, timeout=2, maxQueuedEntries=100, reconnectWaitTime=1]", "create a Remote Logger object, to use with `RemoteLogAction()` and `RemoteLogResponseAction()`"},
{"newRuleAction", true, R"(DNS rule, DNS action [, {uuid="UUID", name="name"}])", "return a pair of DNS Rule and DNS Action, to be used with `setRules()`"},
- {"newServer", true, R"({address="ip:port", qps=1000, order=1, weight=10, pool="abuse", retries=5, tcpConnectTimeout=5, tcpSendTimeout=30, tcpRecvTimeout=30, checkName="a.root-servers.net.", checkType="A", maxCheckFailures=1, mustResolve=false, useClientSubnet=true, source="address|interface name|address@interface", sockets=1, reconnectOnUp=false})", "instantiate a server"},
+ {"newServer", true, R"({address="ip:port", qps=1000, order=1, weight=10, pool="abuse", retries=5, udpTimeout=0, tcpConnectTimeout=5, tcpSendTimeout=30, tcpRecvTimeout=30, checkName="a.root-servers.net.", checkType="A", maxCheckFailures=1, mustResolve=false, useClientSubnet=true, source="address|interface name|address@interface", sockets=1, reconnectOnUp=false})", "instantiate a server"},
{"newServerPolicy", true, "name, function", "create a policy object from a Lua function"},
{"newSuffixMatchNode", true, "", "returns a new SuffixMatchNode"},
{"newSVCRecordParameters", true, "priority, target, mandatoryParams, alpns, noDefaultAlpn [, port [, ech [, ipv4hints [, ipv6hints [, additionalParameters ]]]]]", "return a new SVCRecordParameters object, to use with SpoofSVCAction"},
getOptionalIntegerValue("newServer", vars, "tcpConnectTimeout", config.tcpConnectTimeout);
getOptionalIntegerValue("newServer", vars, "tcpSendTimeout", config.tcpSendTimeout);
getOptionalIntegerValue("newServer", vars, "tcpRecvTimeout", config.tcpRecvTimeout);
+ getOptionalIntegerValue("newServer", vars, "udpTimeout", config.udpTimeout);
handleNewServerHealthCheckParameters(vars, config);
#[serde(default = "crate::U32::<1>::value", skip_serializing_if = "crate::U32::<1>::is_equal")]
weight: u32,
#[serde(default, skip_serializing_if = "crate::is_default")]
+ udp_timeout: u8,
+ #[serde(default, skip_serializing_if = "crate::is_default")]
pools: Vec<String>,
#[serde(default, skip_serializing_if = "crate::is_default")]
tcp: OutgoingTcpConfiguration,
type: "u32"
default: 1
description: "The weight of this server, used by the `wrandom`, `whashed` and `chashed` policies, default: 1. Supported values are a minimum of 1, and a maximum of 2147483647"
+ - name: "udp_timeout"
+ type: "u8"
+ default: 0
+ description: "The udp backend query timeout value in seconds, default: 0. Supported values are a minimum of 1, and a maximum of 255. Value greater than 0 will override global UDP timeout setting"
- name: "pools"
type: "Vec<String>"
default: ""
LazyHealthCheckMode d_lazyHealthCheckMode{LazyHealthCheckMode::TimeoutOrServFail};
uint8_t maxCheckFailures{1};
uint8_t minRiseSuccesses{1};
+ uint8_t udpTimeout{0};
Availability availability{Availability::Auto};
bool d_tlsSubjectIsAddr{false};
bool mustResolve{false};
``qps`` ``number`` "Limit the number of queries per second to ``number``, when using the `firstAvailable` policy"
``order`` ``number`` "The order of this server, used by the `leastOutstanding` and `firstAvailable` policies"
``weight`` ``number`` "The weight of this server, used by the `wrandom`, `whashed` and `chashed` policies, default: 1. Supported values are a minimum of 1, and a maximum of 2147483647."
+ ``udpTimeout`` ``number`` "The timeout (in seconds) of a UDP query attempt"
``pool`` ``string|{string}`` "The pools this server belongs to (unset or empty string means default pool) as a string or table of strings"
``retries`` ``number`` "The number of TCP connection attempts to the backend, for a given query"
``tcpConnectTimeout`` ``number`` "The timeout (in seconds) of a TCP connection attempt"
- **queries_per_second**: Unsigned integer ``(0)`` - Limit the number of queries per second to ``number``, when using the ``firstAvailable`` policy
- **order**: Unsigned integer ``(1)`` - The order of this server, used by the `leastOutstanding` and `firstAvailable` policies
- **weight**: Unsigned integer ``(1)`` - The weight of this server, used by the `wrandom`, `whashed` and `chashed` policies, default: 1. Supported values are a minimum of 1, and a maximum of 2147483647
+- **udp_timeout**: Unsigned integer ``(0)`` - The udp backend query timeout value in seconds, default: 0. Supported values are a minimum of 1, and a maximum of 255. Value greater than 0 will override global UDP timeout setting
- **pools**: Sequence of String ``("")`` - List of pools to place this backend into. By default a server is placed in the default ("") pool
- **tcp**: :ref:`OutgoingTcpConfiguration <yaml-settings-OutgoingTcpConfiguration>` - TCP-related settings for a backend
- **ip_bind_addr_no_port**: Boolean ``(true)`` - Whether to enable ``IP_BIND_ADDRESS_NO_PORT`` if available