Keep a backend whose probe path is wrong in service
A backend that 404s on the health probe path but serves queries fine was marked down and excluded from every fan-out for good, since the fail-open only triggers when no backend is left healthy. Classify a probe reply that refuses the request itself - any 4xx, plus 501 - as evidence about the probe, not the backend. Such a backend keeps serving queries and reports the distinct probe_unsupported state on /healthz. Transport failures and 5xx, 503 included, still mark a backend down. Log the misconfiguration once per transition with the backend, probe path and status. Track failure runs per outcome kind so a 404 run and a 503 run never add up to one threshold.
This commit is contained in:
@@ -676,7 +676,7 @@ type healthReport struct {
|
||||
// prober's running state for the same backend.
|
||||
type backendReport struct {
|
||||
Reachable string `json:"reachable"` // "ok" | error text
|
||||
State string `json:"state"` // healthy | unhealthy | unprobed | unmonitored
|
||||
State string `json:"state"` // healthy | unhealthy | probe_unsupported | unprobed | unmonitored
|
||||
Failures int `json:"consecutive_failures"`
|
||||
Successes int `json:"consecutive_successes"`
|
||||
LastProbe string `json:"last_probe,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user