You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(health-check): implement fail-open when all backends are unhealthy #1204
When all backends in a cluster are marked unhealthy by health checks, Sōzu currently returns NoAvailableBackends — the cluster is effectively down. This can cause a dependency outage (e.g., the /health endpoint's database is down) to cascade into removing ALL backends, which is worse than the original failure.
Add fail-open behavior in BackendList::next_available_backend(): when available_backends() returns empty (all unhealthy), fall back to all backends with BackendStatus::Normal regardless of health state. Emit a warning and a health_check.fail_open metric when this happens.
// After checking primary and backup backends:if backends.is_empty(){// Fail-open: route to all Normal backends when none are healthy
backends = self.backends.iter().filter(|b| b.borrow().status == BackendStatus::Normal).cloned().collect();if !backends.is_empty(){warn!("all backends unhealthy for cluster, fail-open: routing to all backends");incr!("health_check.fail_open");}}
Activity
fix: address review findings for health checks, TLS version parsing, …
fix: address review findings for health checks, TLS version parsing, …