-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Streaming Encoding for LIST Responses #5116
Comments
/sig api-machinery |
I'm glad to see this proposal. We have also implemented similar capabilities in our inner repo and are preparing to push this part to upstream. We have submitted a CFP for the upcoming KubeCon China conference. In our implementation, we use sync.Pool to efficiently manage memory allocation and cache the serialized results of each item. When the buffer reaches a certain size, we execute a flush operation to parallelize the serialization processing and write to http2. Additionally, we have added support for gzip compression, which is only enabled when the first batch of cached data reaches 128 * 1024. For json serialization, we have customized the As for protobuf, we generate code through a generator to ensure reverse protobuf marshalling compatibility.
And it has conducted extensive testing with large datasets and have obtained comparative results. @yulongfang Can you share some benchmark results? |
Thank @chenk008 for your introduction. We have many large-scale clusters in Alibaba Cloud. When the controllers of these large-scale clusters are restarted, they will initiate a full list request to the apiserver, which will have a certain impact on the stability of the cluster. We have to use larger machines to run the apiserver, resulting in a waste of resources. In this context, we adopted the method to carry out relevant optimization and achieved the following results. list json format return data stress test scenario description:
list json format return data related stress test data: qps 0.05
qps 0.1
list protobuf Format Returned data Stress test scenario description:
list configmaps format Returned data Related stress test data: qps 0.05
qps 0.1
|
Enhancement Description
k/enhancements
) update PR(s):k/k
) update PR(s):k/website
) update(s):The text was updated successfully, but these errors were encountered: