Posts in category 'mediasoup'
Category: Mediasoup
Mediasoup DataChannels: When Replacing WebSockets Actually Makes Sense
For years, the default answer for real-time bidirectional communication on the web has been simple:
- Need a chat? Use WebSockets.
- Need signaling? Use WebSockets.
- Need lightweight control messages? Use WebSockets.
And honestly, most of the time, that answer is still correct… although not necessarily the most optimal (I still find XMPP / Jabber a pretty robust alternative, and my default choice for certain scenarios where a battle-tested solution with scalability, resilience and chat features matter).
But while working with WebRTC and SFU architectures, I kept running into the same question:
If we already have a fully encrypted, low-latency, bidirectional transport through WebRTC DataChannels (based on SCTP protocol), why introduce a second parallel communication stack with WebSockets?
WebRTC bitrate is not what you think, Part II (Mediasoup edition)
What changes when you add an SFU (Mediasoup) in the middle of the pipeline?
Mafalda SFU receives “Best Scalable Real-Time Media Platform 2026”
I’m happy to share that Mafalda SFU has been recognised as “Best Scalable Real-Time Media Platform 2026” at the Spanish Business Awards organised by EU Business News.
You can find the official listing at https://www.eubusinessnews.com/winners/mafalda-sfu/, and the announcement published on the project website.
It’s always nice when a side project receives some external recognition, especially one that started mostly as an experiment.
How to build WebRTC for Android in Ubuntu 25.04 Signature Post
Google used to provide
prebuild Android images of
libWebRTC library, and in fact, it’s (still) the recomended way to use them on
its own documentation.
But starting on WebRTC M80 release (January 2020), they decided to
deprecate the binary mobile libraries,
and the reasons were that the builds were intended just only for development
purposes, and
users were already building it themselves with their own customizations, or using third party libraries that embedded them
(where have been left developers that just want to build a WebRTC enabled mobile
app?), and they just only provided another build in August 2020 (1.0.32006) to
fill some important security holes, in case someone (everybody?) was still using
the binary mobile libraries.
How to install Python 2.7 on Ubuntu 24.04 (24.10)
Recently I needed to work on the upgrade and migration of a project that was using Mediasoup… version 1.2.8, published 8 years ago and totally outdated up to the point that the documentation for that version was removed from the Mediasoup website:
mediasoup v1 is no longer documented. Sorry. Anyway it’s no longer maintained so please move to the latest version.
Mediasoup prebuilds
At https://github.com/versatica/mediasoup/pull/777 (the lucky number :-D) I’ve
published a PR that allows to create and use prebuild images of mediasoup, not
needing to compile it at install on the target platform. This is done by
compiling the Worker executables in advance for multiple platforms, and bundling
them in the distributed package.
Presenting Mediasoup Horizontal
Although Mafalda SFU is mainly focused on vertical scaling of Mediasoup and the WebRTC stack, the main problem I’ve found companies are facing is about how to easily implement Mediasoup horizontal scaling. I’ve been working on a solution for this problem for a while now, and since Mafalda is built on top of Mediasoup, it’s also needed to help it to provide transparent vertical and horizontal scaling, so let’s see how it works.
WebRTC horizontal scaling
When approaching the horizontal scaling of WebRTC servers, we have two main approaches: decentralized P2P, and using a central server. Each one has its own drawbacks and advantages, and I had difficulties to identify what approach was the best, since I usually have a personal preference for pure P2P architectures, but they are not the most simple nor always the more efficient ones. So when deciding how to approach Mafalda horizontal scaling, I needed to consider the pros and cons of each use case I would need, and here we have my conclusions.
Presenting Mafalda SFU
Mafalda SFU is a massively vertical and horizontal scalable SFU built on top of Mediasoup. This allow to have (theorically) unlimited sized WebRTC-based video room calls.