wide-dress-57902
08/20/2025, 1:55 AMtall-airline-16756
08/20/2025, 1:56 AMtall-airline-16756
08/20/2025, 1:56 AMWorkerOptions
class. Here’s a friendly rundown of the key steps:
• Load Function (load_fnc
): This function decides how busy the worker is. By default, it looks at CPU usage, but you can easily change it to count how many active jobs the worker has. For example:
def load_fnc(worker: Worker) -> float:
max_concurrent_jobs = 9
return len(worker.active_jobs) / max_concurrent_jobs
• Load Threshold (load_threshold
): This sets the max load (between 0 and 1.0) where the worker will still take on new jobs. The default is 0.7, which works well in most cases.
• Resource Allocation: Make sure your worker has enough resources—like 4 CPU cores and 8GB RAM—to comfortably handle the number of conversations you expect. With this setup, managing 10-25 concurrent chats is doable, and you can push it up to 30 if you optimize things.
These settings will help your worker juggle multiple conversations smoothly without slowing down. If you want, I’m here to help you with any of these steps!
Sources: Deploying to production | LiveKit Docs | kubernetes/agent-manifest.yaml | Anatomy of an Agent | LiveKit Docs | Worker options | LiveKit Docswide-dress-57902
08/20/2025, 1:57 AMtall-airline-16756
08/20/2025, 1:57 AMTestSIPAudio
that show multiple clients joining the same room through the same number, with clear audio going back and forth.
If you have a particular scenario in mind or want to dive deeper, just give me a shout—I’m here to help!
Sources: test/integration/sip_test.go | SIP overview | LiveKit Docs