mirror of
https://github.com/coredns/coredns.git
synced 2025-12-18 16:15:18 -05:00
plugin/forward: configurable domain support for healthcheck (#5281)
* plugin/forward: configurable domain support for healthcheck Signed-off-by: hansedong <admin@yinxiaoluo.com>
This commit is contained in:
@@ -50,7 +50,7 @@ forward FROM TO... {
|
||||
tls CERT KEY CA
|
||||
tls_servername NAME
|
||||
policy random|round_robin|sequential
|
||||
health_check DURATION [no_rec]
|
||||
health_check DURATION [no_rec] [domain DOMAIN]
|
||||
max_concurrent MAX
|
||||
}
|
||||
~~~
|
||||
@@ -90,6 +90,8 @@ forward FROM TO... {
|
||||
* `<duration>` - use a different duration for health checking, the default duration is 0.5s.
|
||||
* `no_rec` - optional argument that sets the RecursionDesired-flag of the dns-query used in health checking to `false`.
|
||||
The flag is default `true`.
|
||||
* `domain DOMAIN` - optional arguments that sets the domain of the dns-query used in health checking.
|
||||
If not configured, the requested domain name is `.`. `DOMAIN` is used to configure the domain name.
|
||||
* `max_concurrent` **MAX** will limit the number of concurrent queries to **MAX**. Any new query that would
|
||||
raise the number of concurrent queries above the **MAX** will result in a REFUSED response. This
|
||||
response does not count as a health failure. When choosing a value for **MAX**, pick a number
|
||||
@@ -182,6 +184,18 @@ service with health checks.
|
||||
}
|
||||
~~~
|
||||
|
||||
Or configure other domain name for health check requests
|
||||
|
||||
~~~ corefile
|
||||
. {
|
||||
forward . tls://9.9.9.9 {
|
||||
tls_servername dns.quad9.net
|
||||
health_check 5s domain example.org
|
||||
}
|
||||
cache 30
|
||||
}
|
||||
~~~
|
||||
|
||||
Or with multiple upstreams from the same provider
|
||||
|
||||
~~~ corefile
|
||||
|
||||
Reference in New Issue
Block a user