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!