Commit graph

11 commits

Author SHA1 Message Date
Zhizhen He
2fe5890d8b
Fix typos (#6235)
* Fix typos and add todo to fix spelling of dnsutil.MaximumDefaulTTL

Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-08-10 11:06:48 -04:00
Miek Gieben
fd705b4783
forward/up: HC every 0.5 seconds, do not do exponential backoff (#4371)
* remove hc backoff

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* fix mutex

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* Update plugin/pkg/up/up.go

* fmt

Signed-off-by: Miek Gieben <miek@miek.nl>

Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2021-01-12 13:55:01 +01:00
Miek Gieben
c4fc5cb54a
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>
2020-02-06 19:28:53 +01:00
Ricky S
efbe4ac5e8
Add exponential backoff to healthcheck (#3643)
Move exponential backoff initialization to Start()

Signed-off-by: RickyRajinder <singh.sangh@gmail.com>

Move comment

Increase max interval and update README

Remove trailing whitespace

Change Start() param name back to interval
2020-02-04 14:19:48 +01:00
Miek Gieben
bae9514e94
pkg/up: implement backoff (#2342)
* pkg/up: implement backoff

Every 2nd failure we double the interval until we hit 4 * interval. This
to have some sort of backoff, esp when a large cluster of coredns shares
an upstream (original intent of up package) they will hammer the
upstream. This put some back pressure on that.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Update plugin/pkg/up/up.go

Co-Authored-By: miekg <miek@miek.nl>
2018-12-01 09:07:03 +00:00
Karsten Weiss
6d8a078704 Typo fixes (#2031) 2018-08-14 08:55:55 -07:00
Ruslan Drozhdzh
cffa1948ab Probe simplification (#1784)
* Probe simplification

 - the main reason of rework is that previous implementation hung
   when calling Do() after Stop()

* replace atomics with mutex

* access Probe.interval under lock
2018-05-16 20:38:13 +01:00
Miek Gieben
662edf6607
pkg/up: stop *all* goroutines (#1676)
Stop all goroutines after we get the stop signal.
2018-04-13 16:01:12 +01:00
Miek Gieben
455040c143
doc: some function/vars/const/package level updates (#1558)
* doc: some function/vars/const/package level updates

Various update that stood out while reading godoc.org for CoreDNS.

* Fix some misspellings as well
2018-02-23 15:02:05 +00:00
Miek Gieben
16504234e5
plugin/forward using pkg/up (#1493)
* plugin/forward: on demand healtchecking

Only start doing health checks when we encouner an error (any error).
This uses the new pluing/pkg/up package to abstract away the actual
checking. This reduces the LOC quite a bit; does need more testing, unit
testing and tcpdumping a bit.

* fix tests

* Fix readme

* Use pkg/up for healthchecks

* remove unused channel

* more cleanups

* update readme

* * Again do go generate and go build; still referencing the wrong forward
  repo? Anyway fixed.
* Use pkg/up for doing the healtchecks to cut back on unwanted queries
  * Change up.Func to return an error instead of a boolean.
  * Drop the string target argument as it doesn't make sense.
* Add healthcheck test on failing to get an upstream answer.

TODO(miek): double check Forward and Lookup and how they interact with
HC, and if we correctly call close() on those

* actual test

* Tests here

* more tests

* try getting rid of host

* Get rid of the host indirection

* Finish removing hosts

* moar testing

* import fmt

* field is not used

* docs

* move some stuff

* bring back health_check

* maxfails=0 test

* git and merging, bah

* review
2018-02-15 10:21:57 +01:00
Miek Gieben
fb1cafe5fa
pkg/up: add generic run-this-functions (#1481)
This adds a generic way of start a check function to check a backend.
This package can be used to kick off healthchecks. The package makes
sure only 1 is run at any one time.

It should allow for:
See upstream error -> kick off healthcheck

and not to worry about overwhelming the upstream with a barrage of
queries.
2018-02-05 22:00:29 +00:00