CommCon 2018Talk

Scaling server-side WebRTC applications: the Janus challenge

While P2P media in a browser is one of the best things WebRTC provided to web developers and media enthusiasts, WebRTC servers are often needed to make WebRTC applications actually “scale”, especially with respect to the computing and networking load clients may be subject to otherwise. That said, WebRTC servers may need scaling considerations of their own, typically whenever the number of users to serve grows beyond the capabilities of a single instance. This is true for Janus as well, an open source WebRTC server implemented by Meetecho.

For Janus, though, scaling is an even trickier business. In fact, its general purpose nature means there are different plugins with completely different requirements and media management, which means there is no one-size-fits-all mechanism for scaling Janus-based applications: while some plugins handle each user and their media streams independently of each other, making it easier to just distribute the load on different servers, some don’t or can’t, e.g., due to relationships that may exist among the media they involve. As such, in order to effectively scale, one cannot prescind from the context of the application or use case, in order to evaluate the best possible strategy depending on which plugin is in use, or how the plugin is used.

The talk will go through some of our efforts in that direction, and more specifically will describe how we identified some common properties in the different use cases we had to address. Different strategies will be presented, ranging from a simple deployment of multiple instances, to context-aware separation of responsibilities and brokering of the media resources. The presentation will finally also describe our steps and efforts in defining an ad-hoc framework for making this as transparent as possible to developers and users, in order to come up with what may be seen as a “PaaS”, or “Janus-as-a-service” if you like.

Speakers

Lorenzo Miniero

Video