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
Failover isn't working when backend-level filter is applied #5813
Failover in this doc cannot work as expected when backend-level filter is applied.
After simulating the active app failure, Envoy continues sending requests to it
In the released v1.3.0, I observed that failover depends on a "BIG"(rule-level) cluster, with weights for different backends within a rule set in the endpoints.
This implementation make add-header filter at the backend level defective.
I notice this issue has been fixed in #3246. But this disrupts failover.
When I enable backend-level filter, the rule-level cluster is absent, causing the failover to not work in this scenario.
Repro steps:
Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.
Note: If there are privacy concerns, sanitize the data prior to
sharing.
Environment:
Include the environment like gateway version, envoy version and so on.
The current failover requires integration with the health check feature and does not allow users to specify target services for failover, which can be somewhat confusing. Can we consider making some modifications to this feature's API?
I have a preliminary idea:
Failover is actually based on the endpoint's priority. Could we support referencing multiple services in the Envoy Gateway backend, allowing users to set priority and overprovisioning factors for each service?
cc @mathetake@yuzisun this affects Envoy AI Gateway features that may rely on backend specific filters in the future (credential injection per backend)
one way to solve this could be to add a priority field within weighted clusters in upstream envoy proxy
I'm considering whether we could allow users to set a failover target, not just the other backend within the same rule. By doing this, we could merge the failover cluster endpoints with the normal endpoints into a single large cluster, setting the failover endpoints to a lower priority.
We could implement this using HTTPRouteFilter or BackendTrafficPolicy.
Activity
[-]Failover isn't working in the latest build[/-][+]Failover isn't working when backend-level filter is applied[/+]MaYuan-02 commentedon Apr 25, 2025
The current failover requires integration with the health check feature and does not allow users to specify target services for failover, which can be somewhat confusing. Can we consider making some modifications to this feature's API?
I have a preliminary idea:
Failover is actually based on the endpoint's priority. Could we support referencing multiple services in the Envoy Gateway backend, allowing users to set priority and overprovisioning factors for each service?
arkodg commentedon Apr 25, 2025
thanks for flagging this
when backend specific filters are set, internally weighted clusters is used per backendRef, and i dont think there's any way to set priority for a cluster atm
https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-weightedcluster
arkodg commentedon Apr 25, 2025
cc @mathetake @yuzisun this affects Envoy AI Gateway features that may rely on backend specific filters in the future (credential injection per backend)
one way to solve this could be to add a
priorityfield within weighted clusters in upstream envoy proxyMaYuan-02 commentedon Apr 27, 2025
I'm considering whether we could allow users to set a failover target, not just the other backend within the same rule. By doing this, we could merge the failover cluster endpoints with the normal endpoints into a single large cluster, setting the failover endpoints to a lower priority.
We could implement this using HTTPRouteFilter or BackendTrafficPolicy.
arkodg commentedon Apr 28, 2025
I like the idea @MaYuan-02, modifying it a bit,
fallbackorprioritycan be defined perEndpointingateway/api/v1alpha1/backend_types.go
Line 131 in a2d3973
MaYuan-02 commentedon Apr 29, 2025
@arkodg Thanks for your reply. I will draft a detailed implementation plan and begin work on it shortly.
github-actions commentedon May 29, 2025
This issue has been automatically marked as stale because it has not had activity in the last 30 days.