In a scalable setup where multiple Jitsi shards are fronted by haproxy, how would one deploy a pool of coturn servers to scale out and maintain high availability?
Hosting a single standalone turn server and adding that to prosody config seems straight-forward enough but that’s going to get oversubscribed eventually and would be a single point of failure. So a pool of coturn servers seems like a right way forward, but I’m not sure what’s right way to load balance these.
I’m considering the following options:
- Front it with ELB+haproxy the same way we do for the Meet servers
- Can’t do UDP, so turns only. No turn or stun. Is this a problem?
- Would it be a problem if clients not consistently routed to same server? Need to stick by IP?
- Round-robin DNS
- Less responsive to scale in/out events, but perhaps not an issue for if turn doesn’t need to scale up/down often
- Sticking multiple entries in
external_servicesin prosody config
- Will this even work?
- Messy to dynamically add/remove entries for scaling events
Round-robin DNS approached seems most straight-forward, but I’m keen to know how others are handling this and what pitfalls I need to watch out for.
How does meet.jit.si deploy turn servers?