-
Notifications
You must be signed in to change notification settings - Fork 180
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
Use protobuf encoding for core K8s APIs in apiserver-network-proxy #655
Conversation
Welcome @tosi3k! |
Hi @tosi3k. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/assign @cheftako |
/ok-to-test |
The only failure is with lint, and this PR is not likely the culprit:
|
I like the change. |
+1 to a flag, but the default should be protobuf (I don't see much risk here). |
Thanks - added appropriate flag to both the agent and the server with defaulting to protobuf. PTAL :) |
@tosi3k: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/lgtm (The lint error should hopefully be resolved soon, and this PR will become merge-able.) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jkh52, tosi3k 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 |
@jkh52 given it's an unrelated linter failure, maybe we can force submit the PR? :) Although I suppose it could wait for Monday given Friday is the worst day for releasing / submitting anything, especially in controversial ways like force submitting. |
For core K8s API objects like Pods, Nodes, etc., we can use protobuf encoding which, compared to the default JSON encoding, reduces CPU consumption related to (de)serialization, reduces overall latency of the API calls, reduces memory footprint and the work performed by the GC and results in quicker propagation of objects to event handlers of shared informers.
Core system components of K8s default their serialization method to protobuf for 8 years already: kubernetes/kubernetes#25738.
Some benchmarks comparing JSON vs. protobuf showcasing how the latter data format (de)serializes faster and uses less memory: