-
Notifications
You must be signed in to change notification settings - Fork 176
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
reduce traffic by caching Node objects #99
Comments
Is an informer the right solution? It's less precise than doing a GET (local cache might be stale), but I suppose any caching solution has that problem. We also need to be aware that the provisioner then gets informed about all nodes, even when it only ever needs a handful of nodes in a larger cluster. |
external-provisioner controller already has an informer, maybe we should deprecate I am not too worried about stale Node cache either since I don't think node topology is something that should change often if at all... |
Or, to follow the existing pattern https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/blob/master/controller/controller.go#L473, accept a NodeInformer as an argument so if external-provisioner controller already has one it can pass it in, if not, this controller will create one. |
So let's use an informer. I would leave the current behavior unchanged (i.e. use GET as fallback) and let the caller decide whether it wants to use an informer. |
It may make sense to use an informer-based lister for Node instead of doing a GET for each PVC with a selected node, in particular if there is already a shared informer in the process. Fixes: kubernetes-sigs#99
There's an old TODO in the code about this:
sig-storage-lib-external-provisioner/controller/controller.go
Line 1331 in d3bf59b
Scale testing shows that this is causing significant traffic when provisioning many volumes with selected node: 80kB/s for GET of Nodes, followed by 1.7kB/s for GET of CRDs.
Link to results (likely to go stale):
http://35.243.169.140:3000/d/A354LoAGz/pohlyat-storage-tests?orgId=1&from=1606743419743&to=1606743617019&var-source=adhoc-1333398611282628608-central&var-etcd_type=All&var-etcd_operation=All&var-verb=All&var-resource=All
/cc @verult @jsafrane
The text was updated successfully, but these errors were encountered: