
If you run WebRTC at scale, a large share of your media goes through TURN relays. Restrictive NATs, enterprise firewalls, and clients that hide their IP addresses all push sessions onto relayed candidates, and when TURN server performance drops under load, call quality drops with it. This

For organizations with specific regulatory, scaling, or network control requirements, self-hosted STUN/TURN servers can be a more suitable option than relying on managed service providers to set up and maintain your WebRTC connections. Those seeking cost optimization or increased customization may also benefit from exploring self-hosted solutions.

A code example for automating configuration for WebRTC. Hector shows us how to provision two EC2 instances: one running the Janus WebRTC Server and the other one running coturn.

When WebRTC calls are between parties who are not on the same network, have symmetric public-private pairing (NAT), or have firewall restrictions there are a number of protocols that can be used. This post describes relative QoS performance working with no ICE Servers, a public STUN server, and a self-hosted CoTURN server.