JaaS: the Team that Builds Jitsi Can Now Also Run it for You! Start now

Blog

Open Source SFUs

Published on: December 6, 2019 by saghulCategories: Guest Post | Jitsi Meet | Jitsi Videobridge | Video Conferencing

Today we are trying something new. We invited Tsahi Levent-Levi to write a guest postfor us. For those working with WebRTC for some time Tsahi will be a faminilar name. Tsahi has been working in the software communications space as an engineer, manager, marketer and CTO for the last two decades. In his various roles he meets and helps vendors with their communication projects, especially when these relate to WebRTC, CPaaS and AI.


Building real life applications using WebRTC is more than just grabbing a sample code from GitHub and adding some HTML and CSS on top of it. It requires installing and managing servers.

To get a WebRTC session to work, you will be needing a signaling server (to get the users connected to one another) and TURN servers (to get over NATs and firewalls when needed). In many cases, you will also need media servers to handle some media processing or routing on the server side.

The most common use cases for media servers in WebRTC rely on SFUs, Selective Forwarding Units. These types of servers route media around the network from one user to another. They are quite handy for group video conferences – it enables them to run efficiently without needing to encode and decode the media (a very expensive task) while maintaining a great user experience.

As a developer, if you are in need of an SFU, there are a few alternatives that you can take:

  1. Use a SaaS vendor or a CPaaS provider, use everything and the kitchen sink that they have to offer (including an SFU somewhere in there)
  2. Find a commercial vendor and license an SFU from them
  3. Build your own
  4. Use an open source SFU – like… Jitsi! (there are a few others as well)

That last option is quite popular with those who want to put up their own infrastructure. It gives you both flexibility (you have the source) as well as faster development (it’s a media server implementation).

Why should you be considering the use of an open source SFU?

  • No vendor lock-in. Open source means you aren’t married to any specific vendor. Being able to switch from one provider to another, or one outsourcing company to another means greater flexibility and competition. You are locking yourself in to a specific open source project, but assuming you picked a popular and vibrant alternative, you will find multiple vendors offering both support and development services for that open source project.
  • Extensibility. While the first reason is mostly generic to open source, extensibility is really specific to WebRTC open source SFUs. many of the open source SFUs out there are quite extensible these days, enabling you to not only conduct group video conferences, but also connect PSTN/SIP users to the session, record streams or send media via RTSP/RTMP to external streaming services.
  • Customization. You have access to the code. Which means you can customize it. Modify it to fit your needs. This means fixing bugs you find without waiting for a third party to do that for you, or adding this very unique feature you really need. This mostly depends on your stance – I’ve seen developers treat an open source SFU as a starting point, forking away from the source almost immediately, while others trying to maintain as little modifications as possible. This flexibility is available only through open source development.
  • Infrastructure ownership. Open source gives you a great opportunity to own the infrastructure of your service. Making the decision on where to deploy your media servers and how to scale the service. This enables you to offer a localized service in areas where the popular cloud vendors aren’t readily available and when you need to maintain specific governance. It also enables you to more easily explain to customers how to configure and whitelist your servers in their firewalls if you target large enterprises. This ownership of infrastructure is important in many scenarios.
  • It is free. Open source is free. You download the code and use it, with some restrictions based on the open source license used. There are costs involved, such as support and integration, but for the most part, using open source has a lower TCO (total cost of ownership) versus the alternatives.

Starting a project and needing an SFU? Why not try using an open source one? And if you’re headed that way, make sure you check out these criteria for choosing an open source SFU.


Guest Blog by Tsahi Levent-Levi, Author of BlogGeek.me as well as CEO & Co-founder at testRTC. He also has online courses (free and paid) at webrtccourse.com

Share this!