N Producers on 1 Router vs 1 Producer per Router on N Routers?

First of all, congrats for the great MediaSoup software!

Is there a performance benefit of gathering N Producers on the same Router, compared to creating N Routers and having only 1 Producer per Router?

I’m trying to scale to thousands of viewers and hundreds of producers, and am wondering how to group those Producers at best to scale, in conjunction to pipeToRouter() to leverage other CPUs:

  • 1 Producer <-> 1 Router
  • 10 Producers max in 1 Router
  • 100 Producers max in 1 Router

Options 2 & 3 add complexity, so are only worth if there is added performance.

A Worker (so a separate process that may run into a different CPU code) may run many Routers. The thing is not about Routers but about Workers.

1 Like

Ok, thank you Iñaki!
So no significant difference of performance between Router groupings within the same Worker, good to know.