Host internal Jitsi meet behind load balancer

Hi,
What kind of architecture would you recommend for a company that has 35k employees?
For our proof of concept, we installed jitsi in an internal server with CentOS. Management seems to like this solution but it doesnt seem scalable with only one server.
Is it possible to have multiple instances of jitsi behind an A10 loadbalancer? (I am also interested in an architecture that would work world wide) for example having 3 jitsi servers, 1 in USA, 1 in Asia and 1 in Europe

      A10
         |
         | 
 /       |        \

Jitsi Jitsi Jitsi
USA Asia Europe

1 Like

Search the forum about haproxy, the session should stick based on url param room=.

I’m not sure about A10 Load Balancer, never used one, but when configuring it, have in mind some general specifics:

  • like @damencho said, stick to the parameter “room=”. If it’s not found, then get the room name from the URL – if it’s not a file, a folder and it’s not a request to bosh, then it’s the string after the /
  • once you find the room name, you can add it to a custom HTTP header (X-something), so that you can easily find it in subsequent requests and direct the request to the appropriate server in the pool, based on the stick table
  • you can serve locally (from the local server in the pool) all the static files - images, scripts, etc., but take care to not serve /http-bind (or whatever the bosh url is) locally, otherwise you risk participants from two different regions to join two different JVBs

So it’s 1) the room, 2) the header (for going to an already opened room) and 3) bosh url that have to reach the same meet server, all other files (static, etc.) can be balanced however you want.

P.S.: If you have Octo, you can also serve config.js locally, this way the information in it for the region from which the participant is loading the conference is transferred to Meet, so that an appropriate regional JVB is selected.

Thank you for the response.
For an architecture that supports about 1000 simultaneous participants daily in 4 different regions (US, Europe, Asia, India), Do I really need a Shard in each region?
is it inefficient to have 2,3,4 front ends (web, jicofo,prosody) in US for example and 5-10 JVBs in each region? if not, why is it necessary to have a front end in each region?
We are hosting internally for now. not AWS.

The idea to have frontends is to be able to differentiate the participants based on the geographic region (like you mention you have 4 different ones).

Inside each Meet config you have info about the geo region. Each JVB, on the other end, also has geo region info. So to do a geobalancing you have to somehow stick these together - one way to do this is to use multiple webservers in front of multiple Meets and balance over them.

Another way to do this is for example to have only one web server and inside it serve different config.js to the users coming from different geo regions. You can use GeoIP module in Nginx, for example - https://docs.nginx.com/nginx/admin-guide/dynamic-modules/geoip2/

There could be also other options, these are just off the top of my head. These are just different infrastructure planning strategies, the shards based one with haproxy balancing is the most widely used, Jitsi team uses it too, so you’ll find most answers for it here. A geoip path with only one web server is also an option, but I don’t know if anyone is using it here, it’s a bit more exotic setup.

At the end of the day it all comes down to running costs. Of course you have to take into account the more exotic setup will be harder to support, plus with only one webserver you lose the failover feature of shards/haproxy setup…

Hi
I have configured haproxy loadbalancer for two jitsimeet backends. And also I am able to join same room. everything works fine from jitsimeet mobile app, but when I open conference in browser using loadbalancer domain name at that time I am unable to access camera and microphone
Please help me.