i want to deploy local livekit that support 100 co...
# ask-ai
s
i want to deploy local livekit that support 100 concurent users, each user joins a room with ai agent. what specs do i need for this deployment, and is there stats about the concurent and specs ?
t
Thanks for reaching out, Mostafa. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To help you deploy LiveKit for 100 concurrent users, each in a room with an AI agent, here are some friendly recommendations for your setup: • Workers: You’ll want about 4 to 10 LiveKit agent workers, depending on how complex your AI agents are. • CPU and RAM: Each worker typically needs 4 CPU cores and 8GB of RAM. So, for 100 users, you’re looking at around 16–40 CPU cores and 32–80GB of RAM in total. • Networking: It’s best to use compute-optimized hardware with high-speed networking (at least 10Gbps) to keep things running smoothly. • Storage: Since workers are stateless, 10GB of ephemeral storage per worker should be plenty. Keep in mind, these are general guidelines and can vary based on the specifics of your AI agents and media features. I’d recommend running some load tests with your actual setup to fine-tune these numbers perfectly for your needs. If you have any questions along the way, I’m here to help! Sources: Deploying LiveKit | LiveKit Docs | Deployment and scaling | LiveKit Docs | LiveKit Pricing | Quotas and limits | LiveKit Docs | Deploying to custom environments | LiveKit Docs
s
so i need agent workers deployment, and what about livekit itself deployment and egress
t
To help you deploy LiveKit and set up egress for 100 concurrent users smoothly, here’s a friendly guide: • LiveKit Deployment: Start by deploying the LiveKit server with enough resources to comfortably support 100 concurrent users. Make sure you have a fast network and set up Redis for coordination — this helps everything run seamlessly. • Egress Deployment: Use the LiveKit Helm chart to deploy the egress service. Each egress instance should have at least 4 CPUs and 4GB of RAM. For handling 100 concurrent egress sessions, it’s best to enable autoscaling with up to 100 replicas or set
replicaCount: 100
. • Configuration: Don’t forget to update the
values.yaml
file with your API keys, Redis address, and storage credentials like S3, GCP, or Azure — this keeps everything connected and secure. • Resource Management: It’s important to define CPU and memory limits in your configuration to keep things stable. For example, request 4 CPUs and 4GB of memory per instance. • Monitoring: Enable Prometheus metrics and health checks so you can keep an eye on performance and autoscaling — this really helps maintain reliability. • Egress Types: Consider using track egress for individual audio/video tracks to save on resources. Use room composite egress only if you need full room recording. This setup is designed to give you both scalability and reliability. If you have any questions or want help with specific parts of the configuration, please feel free to reach out — I’m here to help! Sources: Self-hosting the Egress Service | LiveKit Docs | egress/templates/NOTES.txt | cmd/lk/egress.go
s
is the load heavy on agents server or livekit or egress?
t
Thanks for reaching out! Let’s walk through how the load is distributed in your setup, so you have a clear picture: • AI Agent Workers: These are the workhorses handling most of the AI processing. They run the AI models and manage media processing for each user-agent interaction. The load is spread across workers using a job distribution system, and how much each worker can handle depends on its CPU and memory resources. • LiveKit Server: This server takes care of signaling, room management, and media routing. While it’s super important for real-time communication, it usually handles a lighter load compared to the agent workers and egress since it doesn’t do heavy processing. • Egress Service: This service manages recording and media export tasks. It can be quite resource-intensive, especially with room composite egress (which uses Chrome-based rendering). Track egress is lighter and scales better. Ideally, each egress instance should have at least 4 CPUs and 4GB of RAM, and using autoscaling is a great idea for handling high-concurrency situations. To sum it up, the AI agent workers usually carry the heaviest load, followed by the egress service, while the LiveKit server handles a lighter load. Making sure each component has the right resources and autoscaling set up will help keep everything running smoothly. If you have any more questions or need help tuning your setup, I’m here for you! Sources: Universal Egress | Self-hosting the Egress Service | LiveKit Docs | Helm & Kubernetes Deployment | livekit/livekit_composite | DeepWiki | Infrastructure & Deployment | livekit/livekit_composite | DeepWiki | Deployment and scaling | LiveKit Docs
s
and do i need to deploy ingress ?
t
Hey there! Deploying LiveKit ingress is really only needed if you're looking to bring in external media sources that don't support WebRTC right out of the box. Just to give you some examples: • RTMP/RTMPS streams: Perfect if you're live streaming from OBS Studio or hardware encoders. • WHIP protocol sources: These are for media sources using the WebRTC-HTTP ingestion protocol. • HTTP-pull sources: Great for streaming media files like HLS, MP4, or MP3. • SRT server sources: Useful when ingesting media from Secure Reliable Transport servers. If your setup is just about WebRTC-based connections — say, AI agents and users connecting directly via WebRTC — then you actually don’t need to worry about ingress. But if you want, I’m here to help guide you through deploying ingress for any of these cases. Just let me know! Sources: Ingress overview | LiveKit Docs | Helm & Kubernetes Deployment | livekit/livekit_composite | DeepWiki | Deploy to a VM | LiveKit Docs | README.md | Self-hosting the Ingress Service | LiveKit Docs
s
write a Statement of Work (SoW) that i can share with a vendor to make a complete deployment of livekit, egress, and agents
t
I'd love to help you create a Statement of Work (SoW) for deploying LiveKit, egress, and AI agents. To make sure it fits your needs perfectly, could you please share a bit more about: • Is this SoW meant for an internal team or an external vendor? • Would you like assistance with defining technical deliverables, timelines, or specific milestones? • Should we include project management details like roles, responsibilities, and success criteria? Once I have this info, I can guide you through crafting an SoW that really works for you. Sources: Deploy and scale agents on LiveKit Cloud | Recording and composition | LiveKit Docs | LiveKit Docs | Custom recording templates | LiveKit Docs | Helm & Kubernetes Deployment | livekit/livekit_composite | DeepWiki
s
external vendor, and want defining technical deliverables
t
I'm happy to share a draft Statement of Work (SoW) template designed specifically for engaging an external vendor to deploy LiveKit, egress, and AI agents. Let's walk through it together: 1. Project Overview This project aims to deploy a self-hosted LiveKit server, configure egress services, and integrate AI agents to support 100 concurrent users. Each user will have their own dedicated room to interact with an AI agent. Our focus will be on ensuring scalability, reliability, and the best possible performance. 2. Scope of WorkLiveKit Server Deployment: Setting up and configuring the LiveKit server to smoothly handle 100 concurrent users, utilizing high-speed networking and Redis for coordination. • Egress Service: Deploying and configuring the egress service to support recording and media export, with autoscaling enabled for up to 100 replicas. • AI Agent Integration: Deploying AI agent workers to manage media processing and interactions for all users, along with configuring job distribution and autoscaling for optimal efficiency. • Monitoring and Metrics: Implementing Prometheus metrics and health checks across all components to keep the system reliable and performance transparent. 3. Deliverables • A fully deployed and configured LiveKit server. • An operational egress service with autoscaling capabilities. • AI agent workers successfully deployed and integrated with LiveKit. • Comprehensive documentation covering deployment architecture, configurations, and monitoring setups. 4. Timeline We expect to complete the project within [insert timeline, e.g., 4 weeks] from the start date. 5. Vendor Responsibilities • Provisioning and configuring all necessary infrastructure. • Ensuring seamless compatibility between LiveKit, egress, and AI agent components. • Conducting thorough load testing to confirm the system can support 100 concurrent users. • Providing post-deployment support for [insert duration, e.g., 30 days]. 6. Client Responsibilities • Providing access to required cloud resources or on-premise infrastructure. • Sharing API keys, credentials, and any other necessary configurations. • Reviewing and approving deliverables at each milestone to keep everything on track. 7. Acceptance Criteria • Successful deployment of all components as outlined in the scope of work. • The system supports 100 concurrent users without any performance issues. • All deliverables are fully documented and approved by the client. Please feel free to let me know if you'd like me to refine this further or add any additional sections. I'm here to help ensure this SoW perfectly fits your needs!