-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Hi, We are planning to take dependency of sharding capabilities of kube-state-metrics and have a few questions before we do so.
What is the current status of sharding functionality? Is it still in preview or is it ready for production purposes?
I see note that says "Sharding should be used carefully and additional monitoring should be set up in order to ensure that sharding is set up and functioning as expected (eg. instances for each shard out of the total shards are configured)." Is this for the considerations of network traffic and resource consumption only? Or does it mean that it can have potential issues and should be carefully monitored?
Also, I see To optimize this further, the Kubernetes API would need to support sharded list/watch capabilities. In the optimal case, memory consumption for each shard will be 1/n compared to an unsharded setup - Currently this doesn't exist. Is there any work happening in this stream to help with kube-state-metrics sharding?
Thanks in advance!
Update - Adding some more information about the limitation with sharding -
- Sharding doesnt provde High Availability. If one of the deployment pods goes down, the resources from which it was supposed to have metrics available for is not reassigned to other running shard. The only way we can have HA with k-s-m is by having 2 instances of k-s-m deployment running, which leads to increased resource usage and there might be some inconsistencies because the service will route traffic to either deployment which might lead to metrics being out of sync between deployments.
Ideal way to provide for HA would be to have an operator which looks for the active and healthy deployment and assigns metric targets dynamically. - Also, using sharding with static deployment would mean we need to know the number of instances before we deploy and doesnt provide for dynamic scale out and scale in.