How does WebRTC handle many-to-many connections?

rodi picture rodi · Jun 16, 2013 · Viewed 11.6k times · Source

if I am in a room with other 7 users, I am wondering if WebRTC force every user to establish a connection to each one of other participants.

Obviously it would consume something like 7kb/s*7 download and even upload, and many connection cannot handle this if their connection is already busy. Instead with some kind of media relay the bandwidth usage would be only 7kb/s but you would lose bandwidth adaptation between peers.

Do you know any media relay, or way to solve this problem? is TURN server ( like https://code.google.com/p/rfc5766-turn-server/ ) suitable for this kind of job ( multicast included )?

Answer

Sam Dutton picture Sam Dutton · Jun 17, 2013

A TURN server works as a fallback relay server in order to enable connectivity when direct peer-to-peer connectivity is impossible because of firewalls or other network issues. (More information here: press P for speaker notes.) TURN servers are not designed for media distribution.

A Multipoint Control Unit could solve the problem you refer to: there's an example topology for this here. As stated in the notes for that slide:

This is a server that's made specifically to do distribution of media, and can handle large numbers of participants; it can also do smart things like selective stream forwarding, mixing of the audio or video, or recording.