How can we autoscale the egress, the correct way ?
# ask-ai
g
How can we autoscale the egress, the correct way ?
t
Thanks for reaching out, Gaurav. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To autoscale LiveKit Egress correctly, you can use the following methods: • Using Prometheus metrics: LiveKit provides the
livekit_egress_available
Prometheus metric to support autoscaling. For example, you can set rules to keep at least 3 instances available or ensure at least 30% of egress instances are available. • Autoscaling with Helm: You can configure autoscaling using options like
targetCPUUtilizationPercentage
,
targetMemoryUtilizationPercentage
, or custom metrics. • Custom metrics: Install the Prometheus adapter to create Kubernetes custom metrics based on the
livekit_egress_available
metric. Note: Room Composite egress can use 2-6 CPUs, so it is recommended to use pods with 4 CPUs when using room composite egress. Sources: Self-hosting the Egress Service | LiveKit Docs