Hi LiveKit team, We're experiencing communication ...
# ask-ai
e
Hi LiveKit team, We're experiencing communication issues between our LiveKit Server and Egress Service, both running in AWS ECS. The egress process appears healthy but the server can't reach it. Error Details: • LiveKit Server logs show:
"twirp error unknown: no response from servers"
• Timeout after 23+ seconds when calling
StartRoomCompositeEgress
• Returns 503 "Service Unavailable" to clients Current Setup: • Both services running in AWS ECS (same cluster/VPC) • Egress process is running (PID 26, health port 9090 responds) • Egress config includes Redis connection (working) • No visible egress service logs Questions: 1. How should LiveKit Server discover and communicate with Egress Service? ◦ Does it use service discovery, direct IP, load balancer, or Redis coordination? 2. What network configuration is required between the services? ◦ Specific ports that need to be open? ◦ Same subnet requirement? 3. How can we debug the communication path? ◦ Are there specific logs or endpoints to check connectivity? ◦ Any configuration we might be missing? 4. Does the egress service need to register itself somewhere for the server to find it? Any guidance on troubleshooting this server-to-egress communication would be greatly appreciated!
t
Thanks for reaching out, Jason. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hi there! Just to help you understand better, the LiveKit Server and the Egress Service chat with each other using Redis Pub/Sub to stay coordinated. Plus, the Egress Service connects to the LiveKit Server through its WebSocket URL (
ws_url
) to get media and manage the session flow. Network Configuration: • Make sure both services are connected to the same Redis instance on port 6379. • The Egress Service needs to connect to the LiveKit Server's WebSocket endpoint, which usually runs on port 7880. • Both services should be in subnets that allow them to talk to each other over TCP for Redis and the WebSocket endpoint. Debugging Steps: 1. Check that both services can connect to Redis without issues. 2. Double-check that the
ws_url
in your Egress config is reachable from the Egress container. 3. Try setting
log_level: debug
in the Egress config to get more detailed logs—it can really help pinpoint problems. 4. Confirm that the
api_key
and
api_secret
in your Egress config exactly match those on the LiveKit Server. 5. Make sure your Egress instances have at least 4 CPUs and 4 GB of memory for smooth operation. 6. If you’re testing locally, you can set
insecure: true
to allow insecure WebSocket connections—just remember, this isn’t recommended for production environments. Please feel free to reach out if anything is unclear or if you’d like me to walk you through any of these steps. I’m here to help! Sources: Universal Egress | Universal Egress | test/config-sample.yaml | Self-hosting the Egress Service | LiveKit Docs | Deploying LiveKit | LiveKit Docs