white-oxygen-36812
12/05/2025, 11:22 AMtall-airline-16756
12/05/2025, 11:23 AMtall-airline-16756
12/05/2025, 11:23 AMterminationGracePeriodSeconds alone is enough to avoid losing LiveKit Egress recordings during a Kubernetes shutdown. Short answer: no — it’s necessary but not sufficient.
What to do
• Keep a generous terminationGracePeriodSeconds value that covers your longest expected recording duration.
• Rely on LiveKit Egress’s graceful-shutdown behavior: on SIGTERM it stops accepting new jobs and lets in-progress jobs finish. This plus a long enough grace period lets recordings complete.
• Ensure autoscaling/availability logic (Prometheus metric livekit_egress_available in LiveKit Cloud or your own monitoring) won’t scale down or terminate pods that are handling active recordings.
If you’d like, tell me:
1. Typical/max recording length you expect, and
2. Whether you use autoscaling or a managed LiveKit Cloud setup — so I can suggest a concrete terminationGracePeriodSeconds value and additional safeguards. Sources: Deploy to Kubernetes | LiveKit docs | Self-hosting the Egress Service | LiveKit docs | Distributed Setup | LiveKit docs | Quotas and limits | LiveKit docswhite-oxygen-36812
12/05/2025, 11:24 AMtall-airline-16756
12/05/2025, 11:24 AMterminationGracePeriodSeconds value I need one quick detail:
What’s the typical or maximum length of a single recording/egress job you expect (minutes or hours)?
Also tell me if you use horizontal autoscaling (HPA/KEDA) that might scale pods down automatically.white-oxygen-36812
12/05/2025, 11:24 AMtall-airline-16756
12/05/2025, 11:25 AMlivekit_egress_available metric or a custom check) so pods with active recordings are not scaled down.
Would you like suggested Kubernetes YAML snippets for the recommended values or help verifying your autoscaler ties to active egress metrics?