-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Making iptables probability more granular in kube-proxy. #83599
Conversation
/priority important-longterm |
Until now, iptables probabilities had 5 decimal places of granularity. That meant that probabilities would start to repeat once a Service had 319 or more endpoints. This doubles the granularity to 10 decimal places, ensuring that probabilities will not repeat until a Service reaches 100,223 endpoints.
9dfdfdf
to
3924364
Compare
iptables apparently uses "a granularity of 1/2147483648" or ~4.65^(-10) https://manpages.debian.org/unstable/iptables/iptables-extensions.8.en.html I'll give an LGTM since it checks out. /lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: freehan, robscott The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Making iptables probability more granular in kube-proxy.
What type of PR is this?
/kind bug
What this PR does / why we need it:
Until now, iptables probabilities generated by kube-proxy had 5 decimal places of granularity. That meant that probabilities would start to repeat once a Service had 319 or more endpoints resulting in poor distribution. This doubles the granularity to 10 decimal places, ensuring that probabilities will not repeat until a Service reaches 100,223 endpoints.
I tested this out with 10k endpoints running on a 150 node Kubernetes cluster. I've included some of the generated iptables output before and after this change in a Gist.
Does this PR introduce a user-facing change?:
/sig network
/cc @freehan