contour icon indicating copy to clipboard operation
contour copied to clipboard

Gateway API: implement proportional 503 responses when invalid backend refs

Open skriss opened this issue 4 years ago • 10 comments

ref. https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.HTTPRouteRule (backendRefs field):

If unspecified or invalid (refers to a non-existent resource or a Service with no endpoints), the rule performs no forwarding. If there are also no filters specified that would result in a response being sent, a HTTP 503 status code is returned. 503 responses must be sent so that the overall weight is respected; if an invalid backend is requested to have 80% of requests, then 80% of requests must get a 503 instead.

We currently handle configuring a 503 if there are no valid backends, but we do not implement the proportional 503 responses when some of the backends are invalid.

skriss avatar Oct 20 '21 18:10 skriss