howardchung / watchparty

Watch anything together in-sync with your friends

Home Page:https://www.watchparty.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scale TURN servers

howardchung opened this issue · comments

We'll need to scale the TURN server soon to support screen/file share and video chat traffic.

Options:

  • Vertically scale the server
  • Horizontally scale the servers (need to update the iceServers config--can we randomly assign servers based on room shard or just randomly per client?

This is what the Coturn docs actually have to say on the topic:

Performance and Load Balancing:

When used as a part of an ICE solution, for VoIP connectivity, this TURN server can handle thousands simultaneous calls per CPU (when TURN protocol is used) or tens of thousands calls when only STUN protocol is used. For virtually unlimited scalability a load balancing scheme can be used. The load balancing can be implemented with the following tools (either one or a combination of them):

  • DNS SRV based load balancing;
  • built-in 300 ALTERNATE-SERVER mechanism (requires 300 response support by the TURN client);
  • network load-balancer server.