last-N-mode configuration question

Hi, Jitsi Team
Recently I notice the “Last-N-Mode” concept about Jitsi,
I am confused about that two different kinds of configuration file include similar configuration parameter:

  1. jitsi-meet configuration file: /etc/jitsi/meet/domain-config.js
    // Default value for the channel “last N” attribute. -1 for unlimited.
    channelLastN: -1,

  2. jvb configuration file: /etc/jitsi/videobridge/jvb.conf
    videobridge {

    cc{

    jvb-last-n = -1
    }

Would you please share the difference and relation about the usage of these parameters in these two files?

Thanks

The former configures the value the client (aka web app) will request, and the latter the one the backend (videobridge) will provide.

Someone may want to limit last N on the backend side to save some bandwidth for example.

Hi saghul, Thanks a lot for your kind information as always:)

There are three further questions about the backend parameters in jvb config file:

  1. If there is no cc.jvb-last-n parameter provided in config file, what is the default behavior of jvb?
  2. If I set the value of cc.jvb-last-n, I wonder whether I also need to add the section of “load-management” in jvb config file as well
  3. I notice there is another related parameter: “load-management.load-reducers.last-n.maximum-enforced-last-n-value” in jvb config file, I wonder the relationship between them.

Btw, If anyone can share how to configure these last-N-mode related parameters with an example will be great. Such as, if the value of cc.jvb-last-n set to 10 and meanwhile, set load-management.load-reducers.last-n.maximum-enforced-last-n-value to 20, what will happen to jvb

Hi emrah,
thank you for your response.
Actually, I already went through the reference you mentioned here and still have my above three questions.
I am not sure whether it is what i think as below:
Q1 - if there is no cc.jvb-last-n parameter in jvb conf, the default behavior is same as the value of “-1”
Q2 - Once I set the value of cc.jvb-last-n, I also need add “load-management” section in jvb config as the reference file
Q3 - After went through the reference file, I still have no idea about the question: if the value of cc.jvb-last-n set to 10 and meanwhile, set load-management.load-reducers.last-n.maximum-enforced-last-n-value to 20, what will happen to jvb

Thanks and wait for your further guide on this.

AFAIK the default values come from reference.conf

1 Like

Correct, it will come from the reference file.

Not really. The main config file is merged with the reference one.

I don’t know that one. @Boris_Grozev can help perhaps?

saghul and emrah, thanks a lot for your confirmation about Q1 and Q2.

Hi, @Boris_Grozev , would you please help to share the light on my Q3
Q3 - After went through the reference file, I still have no idea about the question: if the value of cc.jvb-last-n set to 10 and meanwhile, set load-management.load-reducers.last-n.maximum-enforced-last-n-value to 20, what will happen to jvb

Sorry for the late response, I just see this now.

To clarify the semantics a bit: the effective maximum number of streams that the bridge will forward to a receiver is the lowest of the following values:

  • The value requesed from the client (what’s configured in config.js plus any change the client decides to make, e.g. use last-n=0 for audio-only mode)
  • The static value configured in cc.jvb-last-n (and also ssrc-limit.video)
  • The value based on conference size configured in load-management.conference-last-n-limits
  • The value computed by the load manager, if load-management.reducer-enabled is true

The value -1 is interpreted as “unlimited”.

The load reducer is optional. If enabled, it monitors the global load of the JVB and lowers the last-n limit in order to reduce the load.

Q3: if cc.jvb-last-n is 10, the bridge will never forward more than 10 streams. Since maximum-enforced-last-n-value is more than that, it will never have any effect.

2 Likes

@Boris_Grozev ,
Thanks a lot for your clear explanation on last-N mode. It is very helpful.

Just double confirm below two cases:

  1. If the value requested from client is lowest value among above parameters: but one client A is 5, another client B is 3, I wonder whether the JVB will forward the maximum number of streams to client A is 5 and forward the maximum number of streams to client B is 3.

  2. If I do not set the cc.jvb-last-n in JVB config file, as my understanding, the default value of cc.jvb-last-n is “-1”, I wonder whether “-1” is considered as the lowest value.

That value is per client. So if will forward 5 to A and 3 to B.

-1 means unlimited.

2 Likes

Thanks a lot for your kind confirmation, I am clear now, thanks all :slight_smile:

1 Like