Skip to content
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

Feature request: Total number of streams #74

Open
jpvdpoel opened this issue Nov 17, 2020 · 4 comments
Open

Feature request: Total number of streams #74

jpvdpoel opened this issue Nov 17, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@jpvdpoel
Copy link

jpvdpoel commented Nov 17, 2020

It would be very useful to have a metric for the total number of streams currently being processed.

Currently we can see users (with or without cam) and rooms, but there's no relation (users/cams per room) so the load distribution is still hard to calculate.

Example: 10 users in 2 rooms. Room 1 has 6 users with 1 cam, room 2 has 4 users with 3 cams. This totals to 18 streams (6 * 1 + 4 * 3 = 18). However if it would be 10 users in 1 room, with 3 cams the total would be 30 streams (10*3).

Even though the total number of users and active cams is the same, this would result in higher load on the server.

This is why I think total number of streams would be a very valuable metric to have.

@greenstatic
Copy link
Owner

This is a good idea. I am not too familiar with the details regarding BBB streaming, do you have any resources how exactly BBB handles streams because I think your calculation is wrong. If you have your camera turned on, you as the user don't need to stream your own camera feed. Under this assumption the formula becomes: room camera streams = cameras * (users - 1)

Example: 2/4 (2 cameras, 4 users), users A & B have their cameras turned on.

User User Camera Stream
A B
B A
C A, B
D A, B

For a total of 6 camera streams.

Which would give us the formula: cameras * users - cameras = cameras * (users - 1)
The above example would thus become 2 * (4-1) = 6

So your example; Room 1: 1/6, Room 2: 3/4 cameras/users would become: 1 * (6-1) + 3 * (4-1) = 14 not 18 while the scenario 3/10 cameras/users would be 3 * (10-1) = 27 not 30 camera streams.

This of course assumes you do not stream your own camera feed. Do you have any evidence on the contrary?

@greenstatic greenstatic added the enhancement New feature or request label Nov 29, 2020
@jpvdpoel
Copy link
Author

You might be absolutely right. I have no evidence of it being otherwise.
The bbb-conf --network command also provides an overview of connections and clients, which might be used to verify above hypothesis?

@jpvdpoel
Copy link
Author

WIth the increase of requests due to Covid-19 there's an increasing need to get this data. Is there a way to hack/patch your solution to include this on short-term?

@greenstatic
Copy link
Owner

I'll quickly look into it today if it is possible to get some more information if my previous comment is correct. In the meantime you can hack on your own fork and create a separate docker image. To add a new metric simply follow the template set by other metrics. The "main" function for returning metrics is here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants