Load balancing Jitsi meeting

Hi Team,

We are trying to load balance Jitsi meeting with HAProxy as various tutorials used HAproxy in demo. Jitsi meeting is running in docker.

The basic challenge of sending a conference room to static server should work with below config.
balance url_param room
option httpchk
hash-type consistent

But I dont know what to do about the udp port 10000 of JVB. As HAProxy does not support loadbalancing of UDP traffic.
The conference run for few seconds and then disconnects. The same issue appears in our initial testing when all ports were not open from Firewall(After opening all ports, conference runs fine)

So, how we can manage udp traffic from HAProxy. Is there any other alternative to it.

Hi Team,

It will be helpful if someone can answer above. Also to run Multiple JVB, I have designed below approach in docker. I am testing same. While if someone can tell if the approach is optimum or not, that will be good.

AFAIK, you don’t need a load balancing layer for this use case. Jitsi knows how to distribute the traffic to the videobridges and solves the load balancing issue.

And what is the bandwidth of your external side? Is it higher than a videobridge can manage?

Hi Emrah,

Thanks for your reply.

Yes for JVB shards, load balancing is not required, but if we have two setups of Jitsi(Each having separate Jisti-meet and JVB shards), then I think LB is must and not able to figure out how to manage to route the voice/video UDP packets to the instance where room is created.

(I referred this link:https://meetrix.io/blog/xmpp/jitsi_haproxy_configure.html for HAProxy config, but it does not talk about how to route the UDP (Voice video packets.).

And for setting up second JVB container, my concern was if we can use different port mappings for JVBs(Because Jitsi may have to tell the end user to send traffic on 10001 instead of 10000 if conference scheduled on JVB2). So if just registering JVB in prosody does the Job(considering that all the external container port mapping are know to Jitsi), then it will be simple.

For the bandwidth, we are in discussion and will try to follow the rule n*30Mbits. So for 5 user, approx 150Mbits(18-19 Mbps upload and download). I will have to create setup for 200 users as of now.
I dont know if JVB has its own limit of handling traffic management thats why considering to setup with at least two JVBs.

If I don’t miss anything, you don’t need to manage UDP traffic in this case too. When the clients go to the right Jitsi server through HAProxy, then Jitsi will redirect the clients to the right videobridges which are in its shard. It should be enought to not duplicate the UDP ports for the videobridges.

Hi Emrah,

Thanks again for your revert. Now I start getting some clarity.

So we need to put LB for web container only on 443.

And the UDP should reach directly to our instances based on different ports of JVBs.

Will this be the correct approach?

I think so

Thank you very much Emrah.

Does this mean that each JVB must have its own IP ???

In our case we have 2 and from the internal network we access without problems but of course, from the Internet we pass it through a balancer and only a single IP, with which we have session problems.

Any options or settings por JVB LB only IP or session persistence?

Thanks

IP will be same but ports will be different.
e.g.
10.x.x.10:10000 —> JVB1
10.x.x.10:10001 —> JVB2

OK!!

That is, if each JVB has a different IP, it is possible to use the same port, if we use the same one, it is necessary to assign a port to each JVB, correct?

I have seen that when there is more than one JVB statistics are shared, but I don’t know very well how the client assignment is done <-> JVB

We have a perimeter firewall that inspects UDP 10000 STUN packets that are managed by JVB, in order to configure this element correctly at the session persistence level.

Thanks!!

Thanks a lot!!

I have a LB that exposes a single VIP and has two JVBs assigned below it.

JVB1:
org.jitsi.videobridge.SINGLE_PORT_HARVESTER_PORT=10000 (JVB Port)
org.jitsi.videobridge.NAT_HARVESTER_LOCAL_ADDRESS=10.x.x.10 (node private IP)
org.jitsi.videobridge.NAT_HARVESTER_PUBLIC_ADDRESS=89.x.x.10 (same public IP)

JVB 2:
org.jitsi.videobridge.SINGLE_PORT_HARVESTER_PORT=10001 (JVB Port)
org.jitsi.videobridge.NAT_HARVESTER_LOCAL_ADDRESS=10.x.x.11 (node private IP)
org.jitsi.videobridge.NAT_HARVESTER_PUBLIC_ADDRESS=89.x.x.10 (same public IP)

Does anyone know how is the assignment or persistence of a client session with a JVB? By IP and source port?

If I have two JVBs exposed by the same IP and different ports 10000 and 10001, when establishing a session, how are the clients assigned?

In the event that one of the JVBs goes down, how are those connections reassigned? through statistics or metrics?

Thanks!!

Finally I am following the recommendations made in Port 10000? - #22 by damencho