bigbluebutton-exporter icon indicating copy to clipboard operation
bigbluebutton-exporter copied to clipboard

Feature request: Total number of streams

Open jpvdpoel opened this issue 3 years ago • 4 comments

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.

jpvdpoel avatar Nov 17 '20 08:11 jpvdpoel

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 avatar Nov 29 '20 00:11 greenstatic

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 avatar Nov 30 '20 13:11 jpvdpoel

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?

jpvdpoel avatar Jan 19 '21 07:01 jpvdpoel

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: https://github.com/greenstatic/bigbluebutton-exporter/blob/2043b331ad2b69d0bc699fe24294b5588ea59d41/bbb-exporter/collector.py#L51

greenstatic avatar Jan 20 '21 13:01 greenstatic