I just spent about a week and a half on configuring Octo for regional load balancing. Sorry to say the guide on Github is really lacking and not clear so I decided to invest my time on writing this so maybe it’ll spare someone else from going through all the posts out there trying to figure out how to do it right.
Configuration wise - you’ll need one shard (which is a Jitsi Meet instance, Jicofo, Jitsi video bridge = the quick installation) and some video bridges with just the Jitsi Meet front-end instance which we refer to as clients.
The clients will need to have to work on a shared db to share rooms and not create a room on each server - that you’ll need to figure our how to do - if you have questions on this one I can provide answers to the best of my knowledge (our developer set this on up).
First go through the load balancing guide so your secondary bridge can connect and register with Jicofo.
Once done open your Jicofo log /var/log/jitsi/jicofo.log with your favorite text editor and search for your JVB’s nickname. It should be there.
Once done go through the Octo guide:
Now here’s where things get a bit tricky.
org.jitsi.videobridge.octo.BIND_ADDRESS=10.0.0.1 # the address to bind to locally
org.jitsi.videobridge.octo.PUBLIC_ADDRESS=188.8.131.52 # the address to advertise (in case BIND_ADDRESS is not accessible)
org.jitsi.videobridge.octo.BIND_PORT=4096 # the port to bind to
org.jitsi.videobridge.REGION=region1 # the region that the jitsi-videobridge instance is in
DELETE all the bolded sections in the lines above. They shouldn’t be there they f**k everything up.
I don’t know how whoever wrote that guide didn’t think of stating that.
Then your bind IP is either the server you’re configuring local IP (Attention this is a regional guide meaning two servers won’t be in the same data center meaning they probably won’t be able to connect locally so either connect them using a VPN and use the local IP you’re getting through the VPN) or just use the server your’e configuring Public IP.
Make sure no firewall blocks the port listed or whitelist your server’s IP address.
Add your Octo config to Jicofo - that’s pretty straight forward.
On Jitsi meet you got to enter the lines in the config file exactly as they’re shown with the “testing” and all of it. If you’re using your own instance and connecting via the Jitsi Meet API library add those lines under your conference options and your init options (you probably just need it under the conference options but I did on both just in case).
Then you gotta add your regional information.
Remember, each Jitsi Meet instance needs to be at same area or even on the same server as your regional JVB. So in each region you’ll 1 JVB and 1 jitsi meet instance. The JVB will connect the media stream and the Jitsi Meet will send the region info to Jicofo.
So for your regional info add the following lines to your config file (if using the API just add them next to Octo):
What will happen is users will connect to that Jitsi Meet client with it’s URL (let’s say usa.mycompany.com), the Jitsi Meet instance will report it to Jicofo and will connect it with the bridge that is in RegionA. (You gotta match the region name in Jitsi Meet and that region’s JVB. The JVB region is configured on the sip-communicator.properties.
Suggestion - I like to use the Route53 Latency Routing by Amazon cause it checks your user’s latency when typing a single URL and route it to the server that you configured in the policy. So 1 URL meet.mycompany.com can direct to multiple servers around the world based on proximity.
That’s it! now try connecting from two different regions (use a VPN on one of your computers for that matter) and check the Jicofo log. You should see something like this:
Jicofo 2020-05-21 23:29:25.167 INFO:  org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Region info, conference=ffb214 octo_enabled= true: [[Europe , Europe][US-East, US-East]]
The bolded regions marked above are the JVB regions and the ones following are the clients’ regions.
If you have any issue always track your logs for Jicofo and your JVBs. They helped me a lot.
That and scouring forums and what not trying to figure out what the h*ll