plugin/pkg/up: make default intervals shorter (#3651)
* plugin/pkg/up: make default intervals shorter I think 15 min is too high, make this lower to react faster. Signed-off-by: Miek Gieben <miek@miek.nl> * Update README Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
1818df0d06
commit
c4fc5cb54a
2 changed files with 10 additions and 10 deletions
|
@ -9,14 +9,14 @@
|
||||||
The *forward* plugin re-uses already opened sockets to the upstreams. It supports UDP, TCP and
|
The *forward* plugin re-uses already opened sockets to the upstreams. It supports UDP, TCP and
|
||||||
DNS-over-TLS and uses in band health checking.
|
DNS-over-TLS and uses in band health checking.
|
||||||
|
|
||||||
When it detects an error a health check is performed. This checks runs in a loop,
|
When it detects an error a health check is performed. This checks runs in a loop, starting with
|
||||||
starting with a *0.5s* interval and exponentially backing off with randomized intervals
|
a *0.5s* interval and exponentially backing off with randomized intervals up to *15s* for as long
|
||||||
up to *60s* for as long as the upstream reports unhealthy. The exponential backoff
|
as the upstream reports unhealthy. The exponential backoff will reset to *0.5s* after 2 minutes.
|
||||||
will reset to *0.5s* after 15 minutes. Once healthy we stop health checking (until the next
|
Once healthy we stop health checking (until the next error). The health checks use a recursive
|
||||||
error). The health checks use a recursive DNS query (`. IN NS`) to get upstream health. Any response
|
DNS query (`. IN NS`) to get upstream health. Any response that is not a network error (REFUSED,
|
||||||
that is not a network error (REFUSED, NOTIMPL, SERVFAIL, etc) is taken as a healthy upstream. The
|
NOTIMPL, SERVFAIL, etc) is taken as a healthy upstream. The health check uses the same protocol as
|
||||||
health check uses the same protocol as specified in **TO**. If `max_fails` is set to 0, no checking
|
specified in **TO**. If `max_fails` is set to 0, no checking is performed and upstreams will always
|
||||||
is performed and upstreams will always be considered healthy.
|
be considered healthy.
|
||||||
|
|
||||||
When *all* upstreams are down it assumes health checking as a mechanism has failed and will try to
|
When *all* upstreams are down it assumes health checking as a mechanism has failed and will try to
|
||||||
connect to a random upstream (which may or may not work).
|
connect to a random upstream (which may or may not work).
|
||||||
|
|
|
@ -79,8 +79,8 @@ func (p *Probe) Start(interval time.Duration) {
|
||||||
InitialInterval: interval,
|
InitialInterval: interval,
|
||||||
RandomizationFactor: backoff.DefaultRandomizationFactor,
|
RandomizationFactor: backoff.DefaultRandomizationFactor,
|
||||||
Multiplier: backoff.DefaultMultiplier,
|
Multiplier: backoff.DefaultMultiplier,
|
||||||
MaxInterval: backoff.DefaultMaxInterval,
|
MaxInterval: 15 * time.Second,
|
||||||
MaxElapsedTime: backoff.DefaultMaxElapsedTime,
|
MaxElapsedTime: 2 * time.Minute,
|
||||||
Stop: backoff.Stop,
|
Stop: backoff.Stop,
|
||||||
Clock: backoff.SystemClock,
|
Clock: backoff.SystemClock,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue