mirror of
https://github.com/coredns/coredns.git
synced 2025-11-27 22:24:09 -05:00
plugin/forward: add prefer_udp option (#1944)
* plugin/forward: add prefer_udp option * updated according to code review - fixed linter warning - removed metric parameter in Proxy.Connect()
This commit is contained in:
committed by
Miek Gieben
parent
7c41f2ce9f
commit
bc50901234
@@ -47,6 +47,7 @@ Extra knobs are available with an expanded syntax:
|
||||
forward FROM TO... {
|
||||
except IGNORED_NAMES...
|
||||
force_tcp
|
||||
prefer_udp
|
||||
expire DURATION
|
||||
max_fails INTEGER
|
||||
tls CERT KEY CA
|
||||
@@ -60,6 +61,9 @@ forward FROM TO... {
|
||||
* **IGNORED_NAMES** in `except` is a space-separated list of domains to exclude from forwarding.
|
||||
Requests that match none of these names will be passed through.
|
||||
* `force_tcp`, use TCP even when the request comes in over UDP.
|
||||
* `prefer_udp`, try first using UDP even when the request comes in over TCP. If response is truncated
|
||||
(TC flag set in response) then do another attempt over TCP. In case if both `force_tcp` and `prefer_udp`
|
||||
options specified the `force_tcp` takes precedence.
|
||||
* `max_fails` is the number of subsequent failed health checks that are needed before considering
|
||||
an upstream to be down. If 0, the upstream will never be marked as down (nor health checked).
|
||||
Default is 2.
|
||||
|
||||
Reference in New Issue
Block a user