Hey, I'm looking to deploy a livekit stack (liveki...
# self-hosting
l
Hey, I'm looking to deploy a livekit stack (livekit SIP, livekit server, livekit agents). However I'm not sure to understand the design of the app, can I start several livekit servers with a load balancer in front of it ? https://docs.livekit.io/home/self-hosting/distributed/
n
Hi @loud-elephant-89691 Generally speaking webRTC is a bit more compilated than this. The idea is that you can put a load balancer in front of the websocket API of LiveKit, that works well. But then you need to make sure you have correct ICE process set up using STUN and TURN servers. During this time the user needs to connect to a random UDP port of a specific LiveKit instance (so this part of the traffic cannot be load balanced), but if you have the right STUN and TURN setup, this should work.
The bad news is that you need to get familiar with these protocols if you want to run your own LiveKit, otherwise you can shoot yourself in the foot very easily