shardcake
shardcake copied to clipboard
[Feature request] Pod metrics
Similar to idea of the PodsHealth
trait:
If there was a trait PodsMetrics
or similar, which requires a way to define a load factor (maybe define it to be 0.0 <= x <= 1.0
) for a Pod
.
trait PodsMetrics {
def loadFactor(podAddress: PodAddress): UIO[Float]
}
By using this load factor, a pod would report how "busy" it is (it could simply report the underlying machine's CPU usage or take into account other metrics). Such a load factor could then be exposed further and, for example, be used to implement a Kubernetes HPA. This would enable pods (in both the Kubernetes and Shardcake sense) to be added and removed automatically.