-
Notifications
You must be signed in to change notification settings - Fork 1.6k
KEP-4963: Kube-proxy Services Acceleration #5629
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
base: master
Are you sure you want to change the base?
Conversation
/assign @danwinship @aojea |
Use the kernel flowtables infrastructure to allow kube-proxy users to accelerate service traffic. Change-Id: Iee638c8e86a4d17ddbdb30901b4fb4fd20e7dbda
Co-authored-by: Adrian Moisey <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aroradaman The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
So I still have the same concern I had before: there is no reason given for limiting this to only Service traffic. Of course, the reason the earlier KEP proposed it that way is because kube-proxy was the only place where SIG Network could insert this code (even though it barely interacted with the rest of kube-proxy). But, as Calico already demonstrated, a network plugin could implement the same functionality for both Service and non-Service traffic, without needing anything from kube-proxy. (In fact, it would want to disable kube-proxy's own offloading.) Given that we are now planning to make kindnet a SIG Network project, I think the right answer is to implement offload there. But apparently we already do implement it there, so mission accomplished? (The other possibility is to add a "usage hint" field to Service, which kube-proxy could then take advantage of to know that certain kinds of optimizations, like offload, were useful, kubernetes/kubernetes#127259 (comment). Then it would make sense to implement offload in kube-proxy, for Services that were hinted in a way that indicated they'd benefit from it.) |
I like this idea. |
Signed-off-by: Daman Arora <[email protected]>
|
||
### Service API Extension | ||
|
||
Users can set the `TrafficHint` field to opt in to fastpath acceleration for a Service. In the future, this field can also be leveraged to enable other dataplane optimizations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I very much like the opt-in nature of this. If users ignore the feature, nothing changes.
// TrafficHint indicates the expected traffic behavior of a Service. | ||
// Service implementations may use this hint to apply dataplane optimizations, which can vary | ||
// depending on the type of optimization and the technology used to program the dataplane. | ||
type TrafficHint string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any need to leave space in the API to allow for configuration?
I don't know what the future holds with other expansions here, but what if other modes require settings?
For example: with LongLived, may be we need to configure how long before it takes the fast path?
Or with a reduced conntrack timeout, it may need a configuration as to how long
My question here may come with a lot of inexperience, so it may not be valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that while writing this, but realised it will make the Service API too complicated.
I think we can use gateway-api later to have different types of services maybe separate kinds for LondLivedService, or ShortLivedService and specs for each kind can have configurable attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will defer to @danwinship @aojea @thockin for this.
Picking up from #4964