Increasing the amount of WebRTC connections that an application can handle is an important part of our work. WebRTC Engineer Alfred Gonzalez shares his recent experience scaling a WebRTC application.
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.
TURN is a must for service reliability across firewalls and cross-network. A distributed point of presence setup across geographies can significantly lower the risk of packet loss as opposed to an uncertain dynamic route via the public internet. The WebRTC-CDN service provided by Subspace shows a significant improvement in packet loss, which leads to better stream reception for the remote endpoint.
The Offscreen Canvas API allows for performance enhancements and some interesting techniques that will become more and more a part of WebRTC applications being built now and in the future. By offloading heavy media processing off of the main Javascript thread, high resolution or graphically intensive applications can be provided directly in the browser, without affecting the user’s experience.