Multistream with Horizontal Scaling

Hi I’d like to explore a little bit more the scaling possibilities using Multistream within Video Room.
1- Before, we were using Janus Legacy and we were scaling per media. We had a load balance of 6 Janus and worked really well.
2- Now with multistream, our load balance is per session, which is ok, but if we have a lot of subscribers, it requires way more processing power from a single unit.
Regardless of the effectiveness of the Video Room helper threads which we’re willing to start testing, I understand that the high number of users that we have would require more horizontal scaling.
Initially I was thinking about the scenario below, but not sure if it’s the best fit.

1- Let’s assume Publisher A is connected to Janus A and Publisher B connected to Janus B.
2- Subscriber A will receive media from Publisher A and B.
3- Is it necessary for the Subscriber A to have 2 peers connected to Janus A and B in order to receive these media?
4- Is there any way for Subscriber A with a single Peer to receive media from Publisher A and B (considering Publisher A is on Janus A and Publisher B is on Janus B)?
Secondly, I researched the Cascading method which seems to be interesting, New APIs for cascading VideoRoom publishers by lminiero · Pull Request #3014 · meetecho/janus-gateway · GitHub, but at the same time I have some questions as described in the scenario below.

1- Let’s imagine we have 5 janus servers working with load balancing.
2- Let’s assume Subscriber A is connected to Janus B (one out of the 5)
3- All remaining Janus contain media that Subscriber A needs to receive.
4- Every Janus with exception of Janus B, are publishing their media using publish_remotely in order to relay the media to Janus B.
5- Do you see any bottleneck on Janus B, considering it’s receiving media from all Janus?
6- If we increase the number of subscribers and number of Janus to relay, do you see a bottleneck happening in this scenario?

1 Like