kubernetes-retired / heapster

[EOL] Compute Resource Usage Analysis and Monitoring of Container Clusters
Apache License 2.0
2.63k stars 1.25k forks source link

Heapster should be using protobufs for communication with main apiserver #1422

Closed wojtek-t closed 7 years ago

wojtek-t commented 7 years ago

Heapster is reading/watching a lot of data from main apiserver (especially in large clusters). To reduce the load both in heapster and in apiserver, we should use protobufs for this communication.

If I correctly understand the code here in heapster, we are currently using these two binaries: https://github.com/kubernetes/heapster/blob/e19c9fb0d78695ce02e34afc821be5525f70f1d7/metrics/heapster.go#L55 https://github.com/kubernetes/heapster/blob/e19c9fb0d78695ce02e34afc821be5525f70f1d7/events/eventer.go#L44

It seems to me that to achieve this, we only need to modify this function: https://github.com/kubernetes/heapster/blob/96d9dbf9ee20c200bb7703a8dff0b5ea7c1d1ba1/common/kubernetes/configs.go#L66

by setting:

kubeConfig.ContentType = "application/vnd.kubernetes.protobuf"

@gmarek @shyamjvs @piosz @aleksandra-malinowska

wojtek-t commented 7 years ago

@fgrzadkowski