jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
23.25k stars 6.75k forks source link

Media change during P2P leads to JVB routing stream it's not supposed to (bandwidth leak) #10754

Closed jusquiame closed 2 years ago

jusquiame commented 2 years ago

Description

While in a 1to1 conference one or both navigating on Chrome and P2P working, switching media (camera, screen-share, plugging a camera when none was) leads to the JVB receiving and/or sending the new media stream. I think it's a merely redundant artefact, see remark (1) below.

This doesn't happen when both attendees use Firefox.

Current behavior

JVB gets loaded while in P2P connection

Expected Behavior

switching media while in P2P doesn't load the videobridge.

Possible Solution

????

Possible ugly patch to save those whose P2P is 100% use and bandwidth usage vital

renegotiating P2P connection from scratch upon any streamed media change.

Steps to reproduce

Note : I worked on a dev instance on which I was alone, thus the following method. Another user reproduced the problem on last unstable, observing transceiver/endpointConnectionStats in debug mode.

Additional remarks :

  1. Sometime, the load on JVB follows the following pattern : half_relay_nload_jitsi2 After outgoing traffic went back to near zero, the conference was still live, with neither interruption in audio or video, nor change in quality or framerate. But incoming traffic on server stayed correlated to video stream. Suggests that this is a ghost stream, routed for nothing.
  1. I think this behavior is linked to recent (and mandatory) switch to unified plan.

  2. As mentioned, Chrome seems to be part of the problem as when both users are on FF - that has always used Unified Plan - the problem is not observed.

Environment details

observed on :

jusquiame commented 2 years ago

Still the same with Chrome 97

damencho commented 2 years ago

When this happens what do you see for remote address in the connection popup?

image

Is it p2p?

jusquiame commented 2 years ago

Thanks @damencho. it comes like this :

P2P_moredetails

bgrozev commented 2 years ago

This is a jitsi-meet issue. The bridge connection is always available and the bridge will route whenever it receives packets. It's up to clients to decide whether to use it or not. Can you please move the issue to jitsi/jitsi-meet?

damencho commented 2 years ago

Can you upload your js console logs from such a session?

jusquiame commented 2 years ago

Here it is.

Screen-sharing and JVB weird load start @ : Logger.js:154 2022-01-11T04:53:50.317Z

jitsiMeetP2PBandwidthLeak-jsConsole-1641876882835.log

damencho commented 2 years ago

You are running jitsi-meet with modifications, right? Is ljm changed? What are the versions running?

jusquiame commented 2 years ago

Indeed I modified jitsi-meet, but just a bit. Here are the little customization I made :

That's it.

external-api is untouched, just the version shipped with configuration mentioned above :

jitsi-meet 2.0.6689-1, prosody, tokens, turnserver, web, web-config 1.0.5638-1 videobridge2 2.1-592-g1e2879e0-1

Once again, this is a jitsi + Chrome issue.

jusquiame commented 2 years ago

And many thanks for investigating on this. I use Jitsi in a P2P only context, and I find myself in a situation where an instance that was good for a thousand users or more can now break with only 30 for bandwidth reasons. As server costs are running those days, that's hurting a bit.

jusquiame commented 2 years ago

Hi, and thanks for the patch ! One last question : It's not packed in jan 17 2022 Jitsi version, or is it ? What version to install in order to test it ? Or when will it be in stable version ?

Thanks for your great job anyway. Jitsi is truly amazing.

damencho commented 2 years ago

Or when will it be in stable version ?

No ETA as there was a stable 2 days ago.

This had been merged into lib-jitsi-meet, and hasn't reached jitsi-meet. Once that is done, you can get the version from the unstable debian repo or you can test it on alpha jitsi net or beta meet jit si.

jusquiame commented 2 years ago

Thanks !

jusquiame commented 2 years ago

It works !!! Bug fixed !!! Thanks again and again. (tested and monitored in prod)