any metric that livekit-server exposes in promethe...
# ask-ai
e
any metric that livekit-server exposes in prometheus that can help trigger an egress pod and instance ?
t
Thanks for reaching out, Hamza. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The primary Prometheus metric that livekit-server exposes to help trigger scaling or launching of an egress pod and instance is livekit_egress_available. This metric indicates whether an egress instance is available to accept new requests based on its CPU utilization. It provides a more accurate assessment of instance availability compared to average CPU or memory usage. This metric is commonly used in Kubernetes Horizontal Pod Autoscaling (HPA) configurations to maintain a minimum number or percentage of available instances, ensuring sufficient capacity for egress workloads. For example, you can configure autoscaling to maintain at least 3 available egress instances or 30% availability of the total instances based on this metric. This metric is exposed when the
prometheus_port
is configured on livekit-server, allowing Prometheus to scrape these metrics for autoscaling purposes. Sources: Self-hosting the Egress Service | LiveKit Docs | config-sample.yaml
e
but this metric
livekit_egress_available
is only available if an egress pod is active. what I want is to scale from 0 -> N as per the requirement. in that case what metric, which we need to rely on livekit-server then, that can be used ?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!