envoyproxy / envoyproxy/gateway
Expose `fail_traffic_on_panic` in LoadBalancer API
- Dominant language
- Go
- Stars
- 3k
- Forks
- 864
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 140
Description
## Summary
Add support for failTrafficOnPanic option to allow clusters to reject all traffic when in panic mode, rather than the default behavior of routing to all hosts (including unhealthy ones).
## Use Case
When backend pods experience load-induced degradation, `fail_traffic_on_panic` provides a circuit breaker at the cluster level:
1. Pod A becomes overloaded → health checks start failing → marked unhealthy
2. Traffic redistributes to remaining healthy pods B, C, D
3. They become overloaded → their health checks fail
4. Healthy hosts drop below `panicThreshold` (default 50%)
5. Default behavior: Envoy enters panic mode and routes to ALL hosts (including unhealthy ones that are still struggling)
6. With `failTrafficOnPanic: true`: Envoy rejects all traffic, providing backpressure to clients and giving pods time to recover
## Current State
- `healthCheck.panicThreshold` is exposed
- `failTrafficOnPanic` is **not exposed**
In vanilla Envoy, `fail_traffic_on_panic` is [nested](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/cluster/v3/cluster.proto) inside `zone_aware_lb_config`.
Unfortunately, `fail_traffic_on_panic` is only available in zone-aware lb: https://github.com/envoyproxy/envoy/issues/17659 https://github.com/envoyproxy/envoy/issues/33926
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.