is there a way to horizontally scale livekit RTC s...
# ask-ai
w
is there a way to horizontally scale livekit RTC server? if not, how do i ensure i can run 500+ concurrent rooms with video tracks?
t
Thanks for reaching out, Anand. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm glad you're looking to scale your LiveKit RTC server to support 500+ concurrent rooms with video tracks! To make this happen smoothly, you can deploy a distributed cluster of LiveKit nodes coordinated through Redis. Let me walk you through the steps: • Enable Redis: By configuring Redis in your LiveKit configuration (
config.yaml
), you allow multiple nodes to share state. This helps LiveKit work in a distributed way, so your clients can connect to any node without a hitch. • Deploy Multiple Nodes: Running several LiveKit server instances behind a load balancer is key. Each node will handle media forwarding independently, helping balance the load effectively. • Optimize Media Handling: Features like simulcast and adaptive stream are great tools to manage bandwidth and CPU usage efficiently, especially when sessions get large. If you’re planning for really large sessions—think thousands of participants in a single room—LiveKit Cloud is a fantastic option. It supports up to 100,000 concurrent participants per room/session using a distributed mesh architecture. Also, don’t forget about the
livekit-cli
performance testing utility. It’s super helpful for simulating rooms and benchmarking your setup to ensure everything runs smoothly. Sources: README.md | Subscribing to tracks | LiveKit Docs | delay-handling/raw_data.txt | examples/voice_agents/llamaindex-rag/data/raw_data.txt | README.md