my agents are self hosted on server but i use self...
# ask-ai
c
my agents are self hosted on server but i use selfhost and cloud livekit credentials for testing when i use livekit selfhost creds then agent joins the room faster than livekit cloud creds why?? like for ex. if i do web call then using livekit cloud agent joins in 7sec whereas with selfhost creds agent joins in 3sec during a sip call with livekit cloud creds take 8 rings to pick up call whereas when i use selfhost livekit then it takes 2 rings to pick up why this is so when all things are exactly same all things i meant all code all scripts everything then what i am missing search browse go for documenatation or anywhere then tell me why its happening my livekit selfhost is in mumbai india my clients are from Australia my provider sip trunks are routed in Australia au1 my livekit cloud is free tier and it doesnt give me option to choose any region agents logs: cloud-> {"message": "registered worker", "level": "INFO", "name": "livekit.agents", "agent_name": "sizh_agent", "id": "AW_7JnAvVmY9TT9", "url": "wss://kd-va-1-pxadb3rx.livekit.cloud", "region": "India South", "protocol": 17, "timestamp": "2026-04-29T085850.548255+00:00"} and selfhost-> {"message": "registered worker", "level": "INFO", "name": "livekit.agents", "agent_name": "sizh_agent", "id": "AW_JrXcLfADcqzp", "url": "wss://livekit.sizhitsolutions.com", "region": "", "protocol": 17, "timestamp": "2026-04-29T085849.349185+00:00"}
✅ 1
t
Thanks for reaching out, Karrrtik. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — this is clear and helpful. I’m responding to your question about why the self‑hosted agents (Mumbai) join much faster than the LiveKit Cloud free‑tier agents even though your code/config are the same. Short answer • Geographic routing and network latency are the main reasons. Your self‑hosted server in Mumbai gives more direct, predictable paths from your Australian SIP trunks and clients, so signaling and media setup complete faster. LiveKit Cloud’s free tier does not let you pin a region and can route through shared/cloud edges or additional hops, which adds seconds to join time and more rings on SIP calls. Why this matches your observations • Your logs show the self‑hosted agent registering ~1.2s earlier and the self‑hosted server reports no region (direct endpoint). That lines up with lower round‑trip times to the Mumbai host. • SIP call pickup depends on how quickly the SIP trunk and LiveKit control plane/edge negotiate the media path. Extra hops or cloud relaying increase ring counts and delay pickup. • Free tier Cloud deployments run on multi‑tenant/shared infrastructure and don’t guarantee region pinning or optimized routing—so even if the Cloud shows “India South,” traffic may still traverse additional network paths. What you can do next • If you need consistently low join times, keep using the self‑hosted Mumbai deployment for Australia clients. • If you want Cloud, upgrade to a paid/cloud option that allows region selection or guaranteed co‑location to reduce routing overhead. • Measure latency and hops to compare directly: a. From a client in Australia, run ping/traceroute to both endpoints (wss hostnames) and note RTT and number of hops. b. Capture WebRTC signaling timing (time to WebSocket connect, time to offer/answer, time to ICE connected) for both deployments to see which step adds delay. • If you want, share traceroute/ping results and one example signaling timing trace and I’ll point out which hop or step is adding the most delay. If you’d like, I can show the exact commands to run or the specific timing fields to collect from your agent logs. Which would you prefer? Sources: Understand and Improve Agent Latency | LiveKit | Building Performant Voice Agents in India | LiveKit | Why WebRTC beats WebSockets for realtime voice AI | LiveKit | Agents on LiveKit Cloud | Deploy voice AI on global infrastructure | LiveKi... | Checklist for Regional Deployments | LiveKit, with interactive elements