whats the specification requirements for livekit s...
# ask-ai
a
whats the specification requirements for livekit server and egress server in aws ec2 instance. as both are running on seperate server.
t
Thanks for reaching out, Deepak. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to share the specification requirements for running the LiveKit server and egress server on separate AWS EC2 instances. Let’s walk through them together: Compute Requirements: • LiveKit Egress Server: It’s best to have at least 4 CPUs and 4 GB memory. For smoother performance, you might want to consider compute-optimized instances like c5.2xlarge or c6i.2xlarge. • LiveKit Server: While there aren’t strict documented requirements, examples suggest around 7.5 CPUs and 2 GB memory. Using compute-optimized instances is a good idea, and remember to run only one instance per physical node because of port restrictions. Network Configuration: • For the LiveKit Server, please open these ports: UDP 50000–60000, TCP 7880, 7881, 3478 (TURN), 22 (SSH), and 443 (TLS). • The Egress Server will need ports configured for health checks, Prometheus metrics, and templates as necessary. Storage Requirements: • The Egress Server supports various storage options like S3-compatible storage, Google Cloud Storage, Azure Blob Storage, Alibaba Cloud OSS, or local storage—as long as proper write permissions are set. • The LiveKit Server mainly manages real-time media routing, so it doesn’t have specific storage needs, but do ensure there’s enough space for logs and TLS certificates. Additional Considerations: • Both servers will need to connect to Redis. Please make sure your Redis instance is accessible and that security groups allow connections on port 6379. • For Egress, Chrome sandboxing requires Docker or Kubernetes configurations to enable the necessary system calls. • Don’t forget to configure TLS certificates and domain settings for the LiveKit Server. If you have any questions or need a hand with the deployment, just let me know—I’m here to help! Sources: config-sample.yaml | Running LiveKit on AWS | LiveKit turn detector plugin | LiveKit docs | Deploy to a VM | LiveKit docs | Self-hosting the Egress Service | LiveKit docs
a
what is this 7.5 cpu?
t
Thanks for your question! The reference to "7.5 CPUs" comes from Kubernetes deployment examples for the LiveKit server. It describes the CPU resource limits and requests set for the server: • 7.5 CPUs (7500m): This is the maximum CPU usage allowed for the LiveKit server pod, which means it can use up to 7.5 CPU cores. • 7.0 CPUs (7000m): This is the CPU allocation requested when the pod starts, helping Kubernetes reserve enough resources for smooth operation. These settings are usually chosen for deployment on an 8-core instance, leaving a bit of room for other system tasks. The "millicores" (m) notation is just a Kubernetes way to specify CPU units more precisely. If anything’s unclear or you’d like me to explain further, please don’t hesitate to ask—I’m here to help! Sources: examples/server-gke-vpc-native.yaml
a
so give me proper specification for in bullets point for livekit server and egress service. and video will saved in s3 bukcet itself. so i only need ec2 instance specs
t
I'm happy to share the recommended specifications for running your LiveKit server and egress service on AWS EC2 instances. Here’s what usually works best: LiveKit Server: • Instance Type: Compute-optimized, such as c5.2xlarge or c6i.2xlarge • vCPUs: 8 cores • Memory: 16 GB RAM • Storage: Minimal, since video isn’t stored locally • Network: Make sure ports UDP 50000–60000, TCP 7880, 7881, 3478 (TURN), 22 (SSH), and 443 (TLS) are open Egress Service: • Instance Type: Compute-optimized, such as c5.2xlarge or c6i.2xlarge • vCPUs: 8 cores • Memory: 16 GB RAM • Storage: Minimal, as video will be saved directly to S3 • Network: Please configure ports for health checks, Prometheus metrics, and templates as needed If you have any questions or want to dive deeper into any of these points, just let me know—I’m here to help!
a
why ram required 16 gb?
t
I completely understand why you’re asking about the 16 GB RAM recommendation! It’s not a strict requirement but more of a helpful guideline for certain situations: • Chrome-Based Egress: Since room composite and web egress jobs use headless Chrome, which can be quite memory-hungry, especially when running several jobs at once, having extra RAM really helps. • Concurrent Jobs: If you’re planning to run multiple egress jobs simultaneously, having more memory keeps things stable and avoids running out of resources. • Combined Services: When LiveKit Server, Egress, and other services share the same instance, their combined memory use can add up to around 10–12 GB, so 16 GB gives you a comfortable buffer. • Autoscaling: Having extra memory available helps prevent restarts or job failures during busy times. For most setups, 4 GB RAM per service is a good starting point. But if you expect high concurrency or want to run multiple services together, 16 GB gives you that extra peace of mind. Feel free to share more about your specific use case—I’d be happy to help tailor the recommendation just for you! Sources: Self-hosting the Egress Service | LiveKit docs | Self-hosting the Ingress Service | LiveKit docs | ingress-sample.yaml | Universal Egress | pkg/stats/monitor.go