[SOLVED] Jicofo does not distribute load between bridges

We are having heavy usage of our Jitsi Meet instance (like many others!). So we were setting up a second bridge. It is registered correctly as component, but Jicofo does not distribute the load. One jvb has CPU load 20, the other 0,1. Stats arrive.

Jicofo switches bridges only, if one fails, like here:

Jicofo 2020-03-27 10:16:31.365 SEVERE: [124] org.jitsi.jicofo.JitsiMeetConferenceImpl.log() One of our bridges failed: media.myjitsi.com
Jicofo 2020-03-27 10:16:31.365 INFO: [124] org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Region info, conference=ffa619 octo_enabled= false : [[null, null]]

When firing up the failed bridge, it will get again all new conferences, as I assume it is the first component in the list. The second bridge does not get new conferences.

So where is the load balancing defined in jicofo? Is there any option we have overseen? I know that jvb2 uses MUC now, but I am sure that the stable version also should do some load balancing.

I’m experiecing the same issue, all the load get send to the videobridge I added last.

The log’s of prosody, jicofo and jvb don’t show any errors and the two JVBs seem to chat happily with prosody.

Now I read in https://github.com/jitsi/jicofo/blob/master/doc/load_balancing.md

Current algorithm is based on number of conferences only.

So when one bridge fails, it seems to start over counting conferences and gets assigned all new conferences until it reached the score of the other one:

jvb1: “total_conferences_created” value=“73”
jvb2: “total_conferences_created” value=“112”

Possible workaround: restart both at 5 a.m., so that both start counting from 0 and load balance during the day.

After some hours we should see now jvb2 taking over, but it is still jvb1 which is taking all the new load:

jvb1: “total_conferences_created” value=“130”
jvb2: “total_conferences_created” value=“112”

Reading the BridgeSelector code, it seems that always the first operational bridge in a region is chosen. There is no filter on CPU load or number of conferences on a bridge.

Replaced a setting in jicofo config as shown in the tutorial video with the one in the documentation:

# org.jitsi.focus.pubsub.STATS_PUBSUB_NODE=sharedStatsNode 

Now jicofo is getting the stats, which never arrived before:

Jicofo 2020-03-28 09:50:32.609 INFO: [27] org.jitsi.jicofo.Bridge.log() Video stream count for: jvb-2.myjitsi.net: 4

And conferences seem to be distributed now between bridges by some criteria (which I did not find in the code yet).


the solution did not work for me when configuring the additional bridge-servers via MUC

i get this error in the jicofo log:
WARNUNG: [30] org.jitsi.jicofo.bridge.BridgeSelector.log() No pub-sub node mapped for jvbbrewery@internal.auth.mydomain.tld/jvb2

if it is not subscribed, it cannot load balance, or?

Doc not found on link.