0

Does SFU apply to data channels as well?

As I understand it, it doesn't offer any advantage besides moving the broadcasting of messages to the central SFU (and having just one peer connection).

As I understand it now:

  • without SFU -> send N messages to all N peers through N RTCDataChannels
  • with SFU -> send 1 message to the SFU, then the SFU broadcasts that message to all other N - 1 peers.

Thus, moving the broadcasting of messages from the local peer, to the "remote" SFU. Is this right? And if so, what benefits does this offer?

Vivere
  • 1,919
  • 4
  • 16
  • 35

1 Answers1

1

A SFU has the same advantages for DataChannels as it does for RTP.

  • Reduce network load on the sender. Instead of uploading your message n times you send it once, and SFU handles replication.

  • Reduce CPU load on the sender. The sender only has to one run SCTP Association. It doesn't have to spin up all the threads for each individual congestion controller etc..

  • Reduced distance to peers. Most SFUs are actually made up of a fleet of servers. Each peer connects to the closest SFU geographically to give better round trip times. Senders and Receivers can more quickly respond to loss and other issues.

  • Privacy. Users may not want to establish a direction connection/expose their IP address.

  • Insight. When running a SFU you get more insight into your users sessions. I can isolate if the issue was the sender or receiver. A P2P mesh is harder to debug/reproduce issues.

Sean DuBois
  • 3,972
  • 1
  • 11
  • 22
  • Can you give me a link/reference for some more documentation on the topic? I've been struggling finding quality content – Vivere Jun 27 '23 at 16:55
  • Have you seen https://webrtcforthecurious.com it has a section on 'Applied WebRTC'. What in particular are you looking for? – Sean DuBois Jun 28 '23 at 02:50
  • I will have a look. SFU in particular and more hands-on examples and use cases. I keep seeing WebRTC for conferencing apps, but I'm wondering if it could be applied to other use cases. – Vivere Jun 28 '23 at 08:57