Skip to content
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

Support internalTrafficPolicy: Local for upstream services without service-upstream annotation #11564

Open
AleksaC opened this issue Jul 6, 2024 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@AleksaC
Copy link

AleksaC commented Jul 6, 2024

By default the ingress nginx uses all endpoints of a service in the upstream configuration. This has benefits like allowing proxy_next_upstream to be used, having more even request distribution to upstreams as well as not using conntrack.

However in some cases it is beneficial to avoid traffic between nodes, which can be achived by setting internalTrafficPolicy: Local. In this case it would be useful if ingress nginx only added node-local endpoints to the upstream configuration, avoiding cross-node traffic to the service without having to use service-upstream annotation.

This behavior can be controlled by a flag similar to EnableTopologyAwareRouting that's already supported by ingress nginx.

@AleksaC AleksaC added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 6, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority labels Jul 6, 2024
@strongjz
Copy link
Member

Then why not just use EnableTopologyAwareRouting ?

@AleksaC
Copy link
Author

AleksaC commented Jul 17, 2024

I did that, however in this case I'd prefer if there was no traffic between the nodes, even in the same AZ. Also it seems that EndpointSlice controller falls back to cluster-wide routing if there is a small number of endpoints per zone.

Copy link

This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev on Kubernetes Slack.

@github-actions github-actions bot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
Development

No branches or pull requests

3 participants