-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use video_streams and participants in computing server load #108
Conversation
Hi @einhirn We appreciate you putting the work in to get this implemented. We actually have a plan to implement this is the next major release for Scalelite. We still need to do more research and testing to see what the best way to balance the load is, so once we've got that, we'll put together a PR making the changes. Thanks again |
We improved upon this idea and added separate load factors for audio/video downstreams (in addition to upstreams). Downstream counts depend on the individual meeting size and must be calculated per meeting, then summed up. But since we are iterating over all meetings anyway, that was easy to add. Since this pull request was rejected, I assume that a new one will also be rejected. Source is available on request as per AGPL, if anyone is interested. |
@defnull please mention this also in #99, @farhatahmad revisited it about 5 days ago, maybe your improvement will help... |
I'm interested to test your changes. |
It boils down to an updated
The |
I like that solution and will give it a try in production. What remains a problem is that multiple LB requests that arrive within a poll interval will all be scheduled to the same server, won't they? |
Yes, because Scalelite does not know about the additional load factors until it polls all the meetings again. 60 seconds is a short window, thought. I do not think that this is a real issue, compared to another aspect: Lecture-Rooms are usually opened ahead of time. It is entirely possible that a dozen lecture rooms are opened on the same server, now that meeting count is more or less irrelevant. Once people start to join, everything goes up in flames. Hmm perhaps this was not a good idea after all.. :/ |
No, @jodoma - only if all nodes but one are already heavily loaded. There's a "load + 1" in the handling of a create call. One could change that to something else. Look at
I thought about using e.g. a load increment based on an average of ressources currently in use. Anyway it would need to scale in a way that for one not all rooms are created on the same server but on the other hand not force the system to create a room on a busy server when there's another one (that got the previous meeting) that is idle in comparison. EDITed from starting with "yes" to "no". |
But the "increase by 1" on create should distribute the new rooms across the servers when they are evenly loaded to begin with. |
The problem is that "increase by 1" may not actually do anything, depending on the weight factors. It is very unlikely that two servers are only a single load-point apart, if all the other factors are also considered. |
One idea would be to do a weighted random select, instead of always selecting the lowest load value. |
As announced in #99 I had a go at changing the load computation. I borrowed code from the 'status' task and just multiply video_streams by 100, Users by 10 and add everything together with the meeting count. I don't know if there's a better way to compute the load or whether this might lead to an overflow of the variable in some configuration...
Adding a meeting still increases the load by 1 - I don't know whether that's still enough or whether it's needed at all, but it will be overwritten after the next polling cycle anyway.