Min-recv-bandwidth and min-send-bandwidth behaviour

Hi everybody.

I’m tuning OpenVidu server, and I have a doubt: what is the exact behaviour of openvidu.streams.video.min-recv-bandwidth and openvidu.streams.video.min-send-bandwidth?

I mean, what does it happen if I set min-recv-bandwidth = 300 and the client is not able to send more than 200kbps? Client is kicked out of session?

Same for min-send-bandwidth: what does it happen if my server network is saturated so that is not able to send the limit value?

Moreover, “kbps” means kilobits or kilobytes?

Thank you very much

This is the minimum bandwidth that is reported as available to the remote side from Openvidu. If you set it to 300 but the actual network bandwidth is 200, you’ll be in for a major congestion issue, because Openvidu will be telling the remote client: “hey, it’s OK if you send me video with bitrate of 300 kbps or more”, so the remote browser will send that quality (or higher), and given that in this example the real network bandwidth was 200, it will saturate and congestion will occur (i.e. probably your network will start dropping packets).

This tells Openvidu to send the given video quality, regardless of network conditions. So if you set a value that is higher than the real one, network congestion will cause most packets to be dropped.

Kilobits per second, as measured by most video encoders (as these are parameters that directly affect the video encoding bitrate).

Thank you j1elo for your in-depth reply!

Just to be sure that I understand correctly:

So, does that parameter affect the client at all?

Let’s take an example: client network is very poor, it has 200kbps available in upload, and min-recv-bandwidth is set to 500kbps server-side. How will the client behave? Will it try to send 500kbps, thus saturating his network? Or will it send what is in its capacity, even if less than 500kbps?

Exactly, because that’s what the server is telling the client about available bandwidth. We use REMB congestion control algorithm, under which the receiver side of a communication tells the sender side about its estimation of available bandwidth. If the receiver side is lying… then of course problems will happen.

We don’t recommend to set min-recv-bandwidth too high for this reason. Maybe it’s ok if you feel like setting it to 100 kbps, but don’t push it too much or you’ll have a lying server, and all clients will happily send too much data, this saturating the network.

Worst think is that when the network is saturated, normally the server would detect it and try to tell the clients to send less data. But, because you set min-recv-bandwidth to 500, it then discards its actual estimation, and sends 500 in its place. So the clients continue sending that amount of data, making the situation worse.

Are there any recommended values for these settings? Sounds like minimum should stay at 0, and then max at… what? 500? 2000?

Defaults are fine. However if you’re experiencing bandwidth issues, maybe lowering minimum to 50 is a safer bet. Maximums is up to you, the default of 1 Mbps is good for general videoconference but if you want better quality videos you could allow for 2, 5 or even more Mbps.