gjovanov/roomler

Question: How does janus core scale in roomler

Closed this issue · 4 comments

Hey @gjovanov, I was looking at the architecture and I am not sure how roomler would scale janus. Let's assume there are 1000 rooms with 10 participants each.

What do I need to do so that janus autoscales?

Hey @harshmaur ,
you are right, autoscaling of Janus within Roomler's stack is not something that is provided outside-the-box. For autoscaling you would need to consider deploying Janus on some cloud provider (AWS, Azure, GCP, ...). You might wanna google the informative Lorenzo's (the author of Janus) presentations about scaling Janus.

At the moment we are deploying Roomler on-prem. And for scaling Janus on-prem you have the option to have a fixed number of janus instances and load balance via sticky session cookie (e.g. roomid):

Hope it helps.

Thanks @gjovanov for the information. I reckon the challenge is routing the traffic to the correct Janus instance, which is the same problem with any stateful application we deploy on cloud.

Are there any other challenge to scaling? I believe the other reason is the number of open ports which is hard to do on a kubernetes based cluster?

Correct @harshmaur ... The end effect is stateful app, at least in terms of routing the user to corresponding Janus instance based on a roomid... This is the simplest approach of scaling via sticky session, for the scenario youv'e mentioned: 1000 rooms with 10 participants each... In the case of large rooms e.g. more than 50 participants than you would need to consider completely different path e.g. via RTP forwarding for routing media traffic from one janus instance to another.

Indeed, large number of open ports is problematic when deployed in either Docker (or Docker Swarm) or Kubernates for both Janus and Coturn. Hence most of the times these services are exposed directly over public IP (without NAT).

You can also check Janus Cloud which tries to solve the routing problem via Janus Proxy/Senitel instances.

Thanks @gjovanov for the insight.

I'll close the issue. :)