Scaling experiences and insights please

I’m working on a project where we’re likely to have massive fluctuations in server load based on the time of day and number of sessions.
The application is a virtual fitness class with the idea that they’d have up to 28 publishers, each with 27 subscribers for each class. These classes will last around an hour. Looking at the load testing studies reported, one of these sessions looks like a job for a dedicated c5.4xlarge 16 cores node. We’re using AWS.
We’re still in the application development stage at the moment and using CE, but obviously we’ll go Pro and look at scaling, so I have a few questions about the right approach:
The approach that makes sense to me at this stage is that each session (fitness class) had its own node. These would be created at the start of the class, and then destroyed at the end. The Openvidu server instance itself would be persistent.
-Is this practical? I realize that a session can only be handled by one node, and it makes sense from a cost perspective that once all the participants have left the class that it can be terminated.
But what is the spin-up time? If the coach leading the class was to initiate a fitness class in our web app, and that triggered the creation of a new node in our cluster through the API, how quickly could the coach start that session and have people join? Is it 10 seconds? Two minutes?
Also, how do you assign a session to a particular node?
Do people see any problems with this approach of having 1 node per session and constantly having nodes created and destroyed?

Also, a question about the Openvidu server instance- how much is the load of this affected by the number of sessions/subscribers/nodes? As I increase the number of nodes with the number of sessions, do I have to consider the effect on the load of the Openvidu server instance? If so, to what degree? The usage examples on the pricing page keep the server at 2 cores as the number of nodes grows, so I got the impression it was the nodes doing all the heavy lifting.

Re: Each of the 28 publishers subscribing to the other 27 streams, is this feasible? It’s obviously a massive hike on resources, and people can’t possibly ‘take in’ 27 different video frames at the same time. It strikes me as wasteful, and could this end up being a network bandwidth issue rather than CPU issue? If so, I’ll talk to the project leader about reducing this to 10-12, with thumbnails for the rest so that they can change their subscriptions.

Sorry for the bombardment of questions. I’m just trying to get a heads up about potential challenges when we take this thing to market.

I also just started using OpenVidu initially with 2 CPU & 8 GB ram. But today I had 2 different sessions, and before conference I change config on Azure to 8 cpus & 16 GB ram.
First session was max about 10 participants and second was about 12 max participants each sending and receiving at same time.
With 8 cpus and 16 GB RAm I could barely reach 25% CPU. See attached image.
So I guess you should not have an issue with your server.
Only issue I had with first conference was audio echo.
But second one was no issue.

Hello @netamity,

Yes, you can do it if you want. But I recommend to you to have the server “prepared” before the session to avoid waiting until the node is up and running.

It will depend on the hardware of the node. If you have bigger media nodes, you will be able to manage more simultaneous sessions.

It depends on how you cloud provider is creating a new VM for you. In AWS, it can take from 40 seconds to a few minutes.

Right now the node is selected automatically based on load. New sessions are always placed in less loaded node.

I think is a good idea but is better to have a “pool” of media nodes to avoid launching time.

We are working right now in new load tests to measure the impact of sessions in its load. But it is orders of magnitude smaller than media node load. With tens of simulatenous sessions, 2 CPU cores should be enough for master node.

I hope you have now a more clear idea about OpenVidu.

Regards

Thanks as always for your detailed response. I’ll let it all sink it. Very useful indeed.

1 Like