Do not send traffic to a service until pods are ready. #2021
Replies: 1 comment 1 reply
-
Hey @uptickmetachu, thanks for the feedback! We took a quick look at this yesterday and we're fairly sure what you're running into is an intentional design from the Gateway API, which should be fixable. If you look at the HTTPRouteRule spec and scroll down to the backendRefs section, you'll see:
Because of this behavior, we're fairly certain that your endpoint that is not yet ready is actually invalid until it first comes up. If the endpoint is valid, then becomes not ready, NGF should route the traffic as you expect, to only the service that IS ready. Do you happen to have the statuses of the HTTP Route and Gateway when this issue occurs? That would prove the theory. Also, this guide might be able to help you route traffic when one or more services are unavailable: https://docs.nginx.com/nginx-gateway-fabric/how-to/maintenance/upgrade-apps-without-downtime/ |
Beta Was this translation helpful? Give feedback.
-
I love the simplicity of nginx-gateway-fabric vs kong and other implementations.
One thing I've noticed in my testing is that nginx-gateway-fabric is happy to route traffic to a service while pods are still spinning up.
With the below example HTTPRoute, if the pods for the
echo2
service are still waiting to be ready,nginx-gateway-fabric
will happily route traffic to non ready pods and the user will receive 500 errors. My preference would be to only route traffic to the other service some pods are ready.Beta Was this translation helpful? Give feedback.
All reactions