mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
plugin/health: remove ability to poll other plugins (#2547)
* plugin/health: remove ability to poll other plugins This mechanism defeats the purpose any plugin (mostly) caching can still be alive, we can probably forward queries still. Don't poll plugins, just tell the world we're up and running. It was only actually used in kubernetes; and there specifically would mean any network hiccup would NACK the entire server health. Fixes: #2534 Signed-off-by: Miek Gieben <miek@miek.nl> * update docs based on feedback Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -33,10 +33,6 @@ erratic {
|
||||
|
||||
In case of a zone transfer and truncate the final SOA record *isn't* added to the response.
|
||||
|
||||
## Health
|
||||
|
||||
This plugin implements dynamic health checking. For every dropped query it turns unhealthy.
|
||||
|
||||
## Ready
|
||||
|
||||
This plugin reports readiness to the ready plugin.
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package erratic
|
||||
|
||||
import (
|
||||
"sync/atomic"
|
||||
)
|
||||
|
||||
// Health implements the health.Healther interface.
|
||||
func (e *Erratic) Health() bool {
|
||||
q := atomic.LoadUint64(&e.q)
|
||||
if e.drop > 0 && q%e.drop == 0 {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user