This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, Dhruvil. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Scaling your self-hosted AI Agents Worker is definitely doable, and I’m here to help guide you through it step-by-step. Here’s what you’ll want to do: • Deploy Multiple Instances: You can run several worker instances across your servers and connect them all to the same LiveKit server cluster. Using a load balancer will help distribute job requests smoothly. • Monitor Load: Each worker keeps an eye on its CPU usage and will kindly reject new jobs if it’s feeling a bit overwhelmed (the default threshold is 0.7, but you can adjust this). • Pre-Warm Processes: Setting up idle processes (up to 4 by default) can really help reduce the time it takes to start handling new jobs, making things quicker for you. • Environment Configuration: Don’t forget to set your environment variables like
LIVEKIT_URL
,
LIVEKIT_API_KEY
, and
LIVEKIT_API_SECRET
so everything talks to each other securely and smoothly. Just a little note: unlike LiveKit Cloud, which takes care of automatic scaling and observability for you, with self-hosted setups, you’ll want to put these monitoring and autoscaling tools in place yourself. This way, you can keep everything running efficiently and catch any issues early. Sources: LiveKit Pricing | LiveKit Docs | livekit-agents/livekit/agents/worker.py | Deploying to custom environments | LiveKit Docs | README.md