-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry upstream when using service-upstream annotation #1586
Comments
@mbugeia this is exactly the reason why the default uses endpoints and no services. |
I understand, but using endpoint introduce other issues in our production workload. Making nginx to reload when a pod is lost|updated|scaleup cause a great increase of RAM usage in our case and we end up losing nginx pods. In this state of art we cannot achieve zero-downtime deployments:
|
@mbugeia I am sorry but you need to chose one of the modes. |
Keep in mind that using services you are adding an additional component in the mix, i.e. kube-proxy |
I understand. It seems that this #912 can mitigate the behavior at least for voluntary disruptions. |
@mbugeia please check the latest comment #322 (comment) |
Is this a BUG REPORT or FEATURE REQUEST? :
FEATURE REQUEST
NGINX Ingress controller version:
0.9.0-beta.15
When using the annotation service-upstream, a race condition can happen when the underlying pod is removed from the service endpoint (eg: node lost, rolling-update,...), nginx will try the service only 1 time and that can cause 5xx on the client side.
My proposal would be to declare multiple time (at least 3, maybe configurable ?) the same server in nginx upstream. This would allow nginx to retry the request and mitigate the risk to serve 5xx response to the client.
Current generated configuration:
Proposed generated configuration:
This would work because there is this line already set in all location:
proxy_next_upstream error timeout invalid_header http_502 http_503 http_504;
Note: this is kind of related to #1488
The text was updated successfully, but these errors were encountered: