• Miek Gieben's avatar
    plugin/proxy: kick of HC on every 3rd failure (#1110) · e34e2c25
    Miek Gieben authored
    * healthchecks: check on every 3rd failure
    
    Check on every third failure and some cleanups to make this possible. A
    failed healthcheck will never increase Fails, a successfull healthceck
    will reset Fails to 0. This is a chance this counter now drops below 0,
    making the upstream super? healthy.
    
    This removes the okUntil smartness and condences everything back to 1
    metrics: Fails; so it's simpler in that regard.
    
    Timout errors are *not* attributed to the local upstream, and don't get
    counted into the Fails anymore. Meaning the 'dig any isc.org' won't kill
    your upstream.
    
    Added extra test the see if the Fails counter gets reset after 3 failed
    connection.
    
    There is still a disconnect beween HTTP healthceck working the proxy (or
    lookup) not being able to connect to the upstream.
    
    * Fix tests
    e34e2c25
reverse_test.go 1.63 KB