Jibri Load Balancing and Selector

I have Jitsi and Jibri setup in AWS. Jibri instances are setup to use instance id as their nickname for the uniqueness required when logging into JibriBewery.
I noticed that many times few of the jibri instances handle a lot of recording compared to others.
This causes lot of cpu surpluscredits being used unnecessarily on a 1 or 2 instances out of 10, where as other instances have accumulated 4 or 5 times cpu credits of those surpluscredits.
It seems like many of the jibri instances have less to do compared to few in the group.
Can anyone point me to how jibri instances are selected ?
Great if someone, can possibly point me to even the code in github for this selection ?
Is it selected by sort order according to the jibri nickname or which jibri instance has logged in first in jicofo?

1 Like

Wow, exactly what I was looking for and it makes sense why few nodes are used often, compared to others, mainly because its picking firstIdle. Wish it was more randomised but will test some workaround it before actually modifying this code. As I would prefer not making any changes to it.

Thanks a lot. :slight_smile: