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.

Mafalda aproach is simple: just create a MafaldaRouter instance, and it will scale itself to use all the server CPU cores and create the connections to other servers. From both developers and users PoV, it’s like using a single Mediasoup Router instance, but running in a server with an humongous big CPU. Not only that, but since Mafalda schedule algorythm try to minimize the number of used connections and CPUs, you can run multiple MafaldaRouter instances in the same server, and Mafalda will balance the resources between them. And when they are not needed anymore, connections get closed and the CPU cores are freed, so you can stop the servers to reduce costs, all this without needing to administer them and almost without configuration.

The main features of Mafalda are:

  • Fully automated: you only need to create a MafaldaRouter instance, and it will take care of everything else
  • Optimiced resources consumption on half-used machines compared to libraries using other architectures, allowing to host multiple rooms on the same machine without needing to pre-assign resources, that could lead to a suboptimal usage
  • Designed to support adding a new server to the cluster, without needing to restart the whole cluster. It also can make use automatically of new added CPU cores in a server (if it has support) without needing to restart the process
  • API heavily influenced by Mediasoup, so it’s easy to understand, use and migrate from your existing code
  • 100% acceptance tests code coverage for both lines, branches statements and functions. This has shown to be very useful to find bugs until the very last moment

I’ve been working on Mafalda since March 2021, and so far I’ve fully implemented vertical scaling, and got to a point where both API and code are stable and ready to start testing in real enviroments.

At the same time, I’m currently working on horizontal scaling too. So far I’ve implemented a client library with the same API of local Mafalda instances, and designed an events-based RPC protocol that replicate the state of the remote Mediasoup objects and the Mafalda instances, allowing to work with them as if they were local ones. That would help not only to easily migrate deployments from local to cluster environments, but also to simplify automated management of horizontal scaling and inter-server connections.

@ibc sorry if this is offtopic, I’ve not found any sub-forum for third-party libraries in the Mediasoup ecosystem, but since I’m trying to promote Mafalda as a commercial product, I thought this sub-forum could be the best fit of all the available ones. Don’t mind if you move it to offtopic sub-forum, just wanted to know if this is the correct place to do these announcements.

I see it ok in this category :ok_hand:

1 Like

great, thank you :slight_smile:

MafaldaRouter sounds interesting. But when I go to Mafalda I can only find what seems to be a fork of EDUMeet.

Have you taken a look on the new website at https://mafalda.io/? I have there some updates of the last months

Everything I click there is 404.

True, I need to update the page, thank you for your comment.

are you interested in joining a project to implement scalable mediasoup architecture with recording capabilities :blush: , if so let’s arrange a quick call to discuss this.

I’ve just wrote to your email in the other forum topic :slight_smile:

How can I join the development team ?

Sorry, I’m a private commercial product and I’m not accepting candidates to work on it, at this moment I’m only interested on possible investors, in case you can put me in contact with any of them.

I have revamped the web page during the last days to include the latest advancements on the project and new style and better documentation, and in general provide a more profesional look. You can see it at https://mafalda.io, and any comment is welcome :slight_smile:

Great, i couldn’t find documentation and pricing links on website?

Documentation of APIs, I’m updating it right now.

Regarding pricing, since it’s a modular solution, I’m more inclined to people contact me over email and discuss it over there to have a price more tightly coupled to their actual needs, does it makes sense? Or should I publish something on the web?

That will be great, I think pricing should be published as well as the price is of this library and the cost of the servers will be managed by the users on their own.

And for custom needs people should contact you.

Is there any test result of this library which we can see?

1 Like

Thank you so much for the sugestion, let me think on it. I have been asked about that before, but still didn’t though about what’s the most proper aproach.

Test results, in what way?

Test results to see how well it scales to support n number of people. Things like that.

Apart from that if the architecture of it can be shown in documentation then that will be great.

There should be a way to try it in project as well.

No recent ones, sorry. I have it in my To-do list, in addition to have some deployed instance for demo purposses and maybe offer it as a SaaS, probably I would do it all at once. If only I could get some investor so I can focus on Mafalda SFU full-time, development of these topics would be A LOT faster…

I have info details of the architecture on the web page, in the Projects page and child ones. Maybe is it not clear enough?

At Demos - Mafalda SFU you can see how to integrate it, and there’s also a link to a mock instance to try yourself how much simple is to migrate your actual code base.

Any other sugerence is welcome :slight_smile: