Hello! If I deploy my agent on us-east-1 and use l...
# ask-ai
m
Hello! If I deploy my agent on us-east-1 and use livekit cloud for SFU what concurrency limits will I have in the Ship plan.
t
Thanks for reaching out, Harshita. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thank you for your question! While the specific concurrency limits for the Ship plan in LiveKit Cloud using SFU in the
us-east-1
region aren’t explicitly listed, I’m happy to share some helpful general info. For the free Build plan, the concurrency limits include: • Up to 100 total connected agents and end-users across all rooms. • Other limits like 5 agent sessions, 5 LiveKit Inference STT connections, 5 TTS connections, 2 ingress requests, and 2 egress requests. LiveKit Cloud is designed to support global scalability, with a practical limit of 100,000 simultaneous participants per session. Just so you know, all LiveKit Cloud agents are currently deployed to
us-east
(N. Virginia), which matches the
us-east-1
region. For the most accurate and detailed info about the Ship plan’s concurrency limits, I recommend checking out the LiveKit Cloud dashboard under Settings > Project, or you can visit the pricing page. If you have any more questions or need help navigating those, I’m here for you! Sources: Quotas and limits | LiveKit docs | delay-handling/raw_data.txt | examples/voice_agents/llamaindex-rag/data/raw_data.txt | Deploying to production | LiveKit Docs
m
Nope - i mean if i self host my worker how many concurrent user sessions can i have
t
When it comes to self-hosted LiveKit workers, there aren’t any set concurrency limits, which gives you a lot of flexibility! The number of concurrent user sessions you can support really depends on the resources and architecture of your infrastructure. Some important things to keep in mind are: • The hardware and network resources you’ve allocated to your deployment. • How you’ve configured the media server and worker processes. • Strategies for scaling, like using load balancing across multiple worker instances. To get a clear picture of how many users your setup can handle, I’d suggest doing some load testing under conditions that match your real-world usage. This way, you’ll have a better sense of your system’s capacity. If you need any help with this, feel free to reach out—we’re here to support you! Sources: Quotas and limits | LiveKit docs | LiveKit Pricing | Worker lifecycle | LiveKit Docs
m
Nopee - i mean use livekit cloud for SFU and self host my worker, how many concurrent sessions can I support on build plan - please make no mistakes
t
Thank you for reaching out! When you're using LiveKit Cloud for SFU on the Build plan and self-hosting your workers, here’s a helpful overview of the concurrency limits: • LiveKit Cloud (Build Plan): You can have up to 100 total connected participants across all rooms, along with 5 agent sessions, 2 ingress requests, and 2 egress requests. • Self-Hosted Workers: There aren’t any fixed concurrency limits here. Instead, the capacity really depends on your infrastructure—things like CPU, RAM, and network resources play a big role. For instance, AI agent workers usually support 10–25 concurrent jobs with 4 CPU cores and 8 GB RAM, while egress workers can manage hundreds of TrackEgress jobs with 4 CPUs and 4 GB RAM. To get the best performance, you might want to explore autoscaling, load balancing, and setting custom load thresholds. And for the most accurate understanding of your capacity, running benchmarks under real-world workloads is a great idea. If you have any questions or need further guidance, I’m here to help! Sources: LiveKit Pricing | delay-handling/raw_data.txt | Self-hosting the Egress Service | LiveKit docs | Worker options | LiveKit Docs | Benchmarking | LiveKit docs
m
In your pricing page - there is a 20 agent session limit on ship plan, if i deploy my own worker, will this limit still apply if am still using livekit cloud for my server
t
Thank you for reaching out! I wanted to clarify that the 20-agent session limit on the Ship plan applies only to agents deployed on LiveKit Cloud infrastructure. If you're self-hosting your workers while using LiveKit Cloud for media transport, this limit doesn't apply to you. In that case, your self-hosted workers are limited only by the resources of your own infrastructure, and your billing will be based on resource usage, like bandwidth, rather than session count or concurrency limits. I hope this helps, and please feel free to ask if you have any more questions! Sources: LiveKit Pricing | Deploying to custom environments | LiveKit Docs
m
please give appropriate docs to back your claim also can you share a recommended architecture plan for this setup based on all your knowledge!
t
I'm glad you're exploring self-hosting workers while using LiveKit Cloud for media transport! Just to reassure you, the 20-agent session limit on the Ship plan doesn’t apply in this setup. Here’s a friendly guide to the recommended architecture: • Media Layer: LiveKit Cloud handles WebRTC media transport, including rooms, participants, and SFU-level routing, so you can focus on what matters most. • Worker Layer: You can self-host your workers (think Kubernetes, VMs, or containers) to manage agent logic and media processing. These workers connect securely to LiveKit Cloud via WebSocket connections. • Connection Flow: Workers register with LiveKit Cloud, get job assignments, and join rooms through WebRTC using the same SDKs as cloud-deployed agents. It’s seamless! • Monitoring: Keep an eye on session counts, worker load, and active instances easily through the LiveKit Cloud dashboard. Deployment Guidance: • Make sure to allocate enough resources—for example, 4 CPUs and 4 GB RAM per worker if your tasks are resource-intensive. • Consider autoscaling and load balancing (Kubernetes with Helm charts is a great choice) to help your system grow smoothly. • Ensure your workers have outbound connectivity to LiveKit Cloud endpoints and allow WebRTC traffic (UDP/TCP) for smooth communication. For more details, you might find these resources really helpful: • Deploying to Custom Environments • Self-hosting Egress Service • LiveKit Cloud Overview This hybrid approach is a wonderful way to combine the scalability of LiveKit Cloud with the flexibility of your own self-hosted workers. It’s especially great for use cases like voice AI agents or real-time media processing. If you have any questions or need a hand, feel free to reach out—I'm here to help! Sources: LiveKit Cloud | LiveKit Docs | Deploying to custom environments | LiveKit Docs | Self-hosting the Egress Service | LiveKit docs | Voice AI quickstart | LiveKit docs | LiveKit Pricing
m
Can you tell me what's the architecture of worker, what exactly happens when a session is created
t
Let me walk you through the architecture of a LiveKit worker and how the session creation process works. I hope this helps clarify things! Worker Architecture: • Process Isolation: Each job runs in its own isolated process, which really helps keep everything stable and running smoothly. • Load Management: Workers share their load and capacity info with the server, making sure the system balances the work efficiently. • Prewarming: Workers can prepare resources ahead of time, so starting new jobs feels quicker and more seamless. • Graceful Shutdown: When a shutdown signal comes in, workers gently finish active sessions and stop accepting new jobs, ensuring nothing gets interrupted abruptly. Session Creation Process: 1. Worker Registration: The worker connects and registers with the LiveKit server through a secure WebSocket connection. 2. Job Request: When an agent is needed, the server sends out a job request to available workers. 3. Job Acceptance: Based on its current load, the worker decides whether to accept the job and then starts a new process to handle it. 4. Job Execution: The worker links the agent to the room, sets up components like STT, TTS, and VAD, and begins processing audio and interacting with participants. 5. Session Termination: The session wraps up when the last non-agent participant leaves or if someone manually ends it. This setup is designed to give you scalability, resilience, and efficient use of resources during real-time media sessions. If you have any questions or want to dive deeper into any part, I’m here to help! Sources: livekit-agents/livekit/agents/worker.py | Node.js Agents Architecture | livekit/livekit_composite | DeepWiki | Worker lifecycle | LiveKit Docs | agents/src/worker.ts
m
how do we deploy only 1 worker on eks
why do we need eks
or kubernetes
t
Let's walk through how to deploy a single LiveKit worker on Kubernetes (like EKS) together. Here’s a simple step-by-step guide to help you get started: 1. Prerequisites: First, make sure you have a Kubernetes cluster set up (such as EKS) and that you can access it using
kubectl
. If you’re using EKS, don’t forget to install the AWS Load Balancer Controller. Also, have a Redis instance up and running to help with coordination. 2. Prepare a Helm Values File: You’ll want to create a configuration file similar to this one:
Copy code
replicaCount: 1

livekit:
  rtc:
    use_external_ip: true
  redis:
    address: <redis-host>:6379
  keys:
    <your-api-key>: <your-secret>
  turn:
    enabled: true
    domain: <your-turn-domain>
    tls_port: 3478
    secretName: <turn-tls-secret>

loadBalancer:
  type: alb
  tls:
    - hosts:
      - <your-primary-domain>

autoscaling:
  enabled: false

resources:
  limits:
    cpu: 7500m
    memory: 2048Mi
  requests:
    cpu: 7000m
    memory: 1024Mi
Just replace the placeholders with your own Redis endpoint, API keys, and domain information to make it your own. 1. Deploy with Helm: Next, add the LiveKit Helm repository and install the server using these commands:
Copy code
helm repo add livekit https://livekit.io/charts
helm install livekit-server livekit/livekit-server -f server-eks.yaml
1. Post-Deployment: After deployment, make sure to open the necessary ports (UDP 50000–60000 and TCP 7880/7881), update your DNS records to point to your domain, and verify that your nodes have enough resources (for example, 8-core instances) to run smoothly. This setup will help you get a single LiveKit worker up and running with the right resources and scalability options. If you have any questions or need further assistance, feel free to reach out—I'm here to help!
m
why do we need kubernets
t
I’m glad you asked about deploying LiveKit workers! While Kubernetes isn’t absolutely necessary, it really brings some great benefits, especially when you’re managing deployments in production environments. Here’s why many folks find it helpful: • Scalability: Kubernetes makes it a breeze to scale your deployment up or down depending on what you need, so you’re always using resources efficiently. • High Availability: It has built-in features for failover and redundancy, which means your services stay up and running even if some nodes run into issues. • Resource Management: You can set resource limits and requests to make sure your workers have just the right amount of CPU and memory to perform their best. • Load Balancing: Traffic gets automatically spread across your worker instances, boosting both performance and reliability. • Automation: Tasks like deployment, scaling, and updates can be automated, saving you time and reducing the chance of errors. • Portability: Since Kubernetes is cloud-agnostic, you have the flexibility to deploy your LiveKit workers on any cloud provider or even on-premises. If you’re working on something simple or still in the development phase, deploying LiveKit workers on a single server or VM without Kubernetes can absolutely work. But when you’re gearing up for larger-scale or production deployments, Kubernetes can really make a positive difference in managing everything smoothly.
m
bro
what are the concurrency and limits for eks
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
m
what are the concurrency and limits for egress in the ship plan
there?