are worker processes reused? as in, is there a poo...
# ask-ai
i
are worker processes reused? as in, is there a pool of processes and when one process that has an active call, has that call shut down, does it go back to the pool and wait for another call?
t
Thanks for reaching out, Ed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thank you for your question! I’d love to clarify how worker processes work in LiveKit for you. So, in LiveKit, worker processes aren’t reused by being put back into a pool after finishing a call. Instead, each job—like a call or room session—runs in its own separate process, which is then closed once the job is done. That said, LiveKit does have a smart worker pool system that keeps some pre-warmed, idle processes ready to go. This helps speed things up when a new job comes in. When a new task starts, one of these pre-warmed processes is used, and if needed, a new idle process is created to keep the pool at the right size based on demand. After the job finishes, the process is closed rather than being recycled back into the pool. This approach really helps keep each job isolated while still benefiting from quicker startup times thanks to those pre-initialized processes. I hope this makes things clearer! If you have any more questions, I’m here to help. Sources: Job lifecycle | LiveKit Docs | Deploying to custom environments | LiveKit Docs | tests/test_ipc.py | Worker lifecycle | LiveKit Docs