Hi, quick question - what's the usual way to deal ...
# ask-ai
s
Hi, quick question - what's the usual way to deal with the room size limit when self hosting LiveKit on Kubernetes? Is there a way to split or replicate a room across multiple nodes?
t
Thanks for reaching out, Nouman. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
LiveKit's architecture currently requires that each room resides entirely on a single node, meaning rooms cannot be split or replicated across multiple nodes. However, LiveKit is designed to scale effectively in a distributed setup, especially when self-hosting on Kubernetes. Here are the key points to handle room size limits: • Distributing Rooms Across Nodes: LiveKit can distribute different rooms across multiple nodes in your Kubernetes cluster. Each node hosts one or more rooms, depending on its capacity. • Load-Aware Room Placement: When a new room is created, LiveKit assigns it to an available node based on current load and capacity. • Optimizing Node Resources: To maximize the number of participants a single room can support, you can optimize the resources of individual nodes (e.g., CPU, memory). • Scaling Horizontally: Add more nodes to your Kubernetes cluster to support more concurrent rooms. • Application-Level Splitting: For very large gatherings, consider splitting participants into multiple smaller rooms at the application level. Note that LiveKit requires direct access to the network with host networking, which limits you to one LiveKit pod per node in Kubernetes. This ensures that the rtc.udp/tcp ports are directly handled by the LiveKit server. If you have further questions or need assistance with your setup, let me know!
s
So what's the solution?
t
Handling room size limits in LiveKit can feel a bit tricky since rooms can’t be split across multiple nodes, but don’t worry—we’ve got some great ways to work around this and make the most of your setup. Here’s what you can try: 1. Scale Horizontally: Think about adding more nodes to your Kubernetes cluster. This way, you can support more rooms running at the same time, with each node hosting several rooms depending on its capacity. 2. Optimize Node Resources: Make sure each node has enough CPU and memory. This helps you get the best performance and supports more participants in each room. 3. Distribute Rooms: LiveKit does a great job of automatically assigning rooms to nodes based on load and availability. Just double-check your cluster is set up to handle this smoothly. 4. Split Large Gatherings: For really big events, it might help to split participants into smaller rooms within your app. For example, you could create separate rooms for different groups or activities to keep things manageable. These tips help you work within the setup where each room lives on a single node. If you want a hand with putting any of this into practice, just let me know—I’m here to help!
s
Other than that
t
Hey there! Just to give you a heads-up, LiveKit’s current setup doesn’t support splitting or replicating a single room across multiple nodes. Each room needs to live entirely on one node—that’s just how it’s designed right now. If hitting the room size limit is a big concern for you, here are a couple of ideas you might find helpful: • Custom Development: You could build some application-level logic to handle interactions across multiple rooms, like sharing important events or messages between them. • Feature Requests: If this is something you’d love to see in LiveKit, feel free to submit a request! The dev team is always open to hearing what users need for future updates. Just let me know if you want a hand diving into these options or if you have a particular situation you’d like to chat about—we’re here to help!