Skip to content

1 Invalid BackendRef causes 500 for all requests #7483

@arkodg

Description

@arkodg

Description:

#443 added the ability to split traffic between valid and invalid backendRefs: invalid portions hould get 500s via the synthetic invalid-backend-cluster, while valid backends continue serving. This worked in v1.2/v1.3.

Later #5747 refactored processHTTPRouteRules.
That change introduced failedProcessDestination/processDestinationError and now short-circuits the entire rule as soon as any backendRef translation fails. Because RouteDestination is never
populated when one backend is bad, RouteDestination.ToBackendWeights() always returns Invalid=0. The weighted-cluster logic from a6870b0 therefore never triggers, so every mixed rule becomes an
unconditional 500. This affects all branches that include the refactor (v1.4.x, v1.5.x, main), even though the xDS translator still has the weighted invalid cluster support.

Expected behavior

  • Valid backendRefs should keep receiving traffic even if sibling backendRefs are invalid.
  • Invalid portions should be routed to the synthetic cluster so 500s are returned proportionally, matching the behavior introduced in a6870b0.

Actual behavior

  • Any backendRef translation error (backend missing, wrong port, etc.) causes the entire rule to emit 500s, so valid backends never run and the invalid-backend weighting path is never exercised.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions