Skip to content

Instantly share code, notes, and snippets.

@bgrozev

bgrozev/octo.md Secret

Last active July 16, 2021 03:49
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save bgrozev/92b096db14cc980d7b734e156a8e6170 to your computer and use it in GitHub Desktop.
Save bgrozev/92b096db14cc980d7b734e156a8e6170 to your computer and use it in GitHub Desktop.
Setting up octo with manually set regions

Setting up Octo

Server1 in region1:

  1. Install the full jitsi-meet suite
  2. Add a second component to the prosody configuration (/etc/prosody/conf.d/example.com.cfg.lua):
Component "jitsi-videobridge2.example.com"
    component_secret = "secret"
  1. Patch jitsi-meet: add deploymentInfo to the whitelist in react/features/base/config/functions.js. It might be easiest to modify the minified file in place.
  2. Enable Octo for jitsi-videobridge. Add these to /etc/jitsi/videobridge/sip-communicator.properties
org.jitsi.videobridge.octo.BIND_ADDRESS=1.2.3.4 #address to bind locally
org.jitsi.videobridge.octo.BIND_ADDRESS=1.2.3.4 #address that server2 can connect to
org.jitsi.videobridge.octo.BIND_PORT=21000
org.jitsi.videobridge.REGION=region1
  1. Configure the jicofo selection strategy. org.jitsi.jicofo.BridgeSelector.BRIDGE_SELECTION_STRATEGY=RegionBasedBridgeSelectionStrategy

  2. Enable octo in config.js (/etc/jitsi/meet/):

testing: {
    octo: {
        probability: 1
    }
}

Server2 in region2

  1. Install the full jitsi-meet suite. You only need jitsi-videobridge here, but it's easier to install everything.
  2. Change the bridge configuration to connect to Server1. Edit /etc/jitsi/videobridge/config and /etc/jitsi/videobridge/sip-communicator.properties
  3. Enable Octo (as for server1)
org.jitsi.videobridge.octo.BIND_ADDRESS=2.3.4.5 #address to bind locally
org.jitsi.videobridge.octo.BIND_ADDRESS=2.3.4.5 #address that server1 can connect to
org.jitsi.videobridge.octo.PORT=21000
org.jitsi.videobridge.REGION=region2

Creating a conference

To tell the client which region you are in, add this to your URL: #config.deploymentInfo.userRegion=region1.

Add one client from region1 and one client from region2. They should connect to different bridges, which can be seem in the connection information on the local thumbnail.

@ztl8702
Copy link

ztl8702 commented Aug 15, 2018

The URL override should be something like #config.deploymentInfo.userRegion="region1" (double quotes needed)

@ztl8702
Copy link

ztl8702 commented Aug 15, 2018

However this still does not actually change the video bridge. The E2E RTT stat shows a "(region2) suffix. But the remote candidate address is still that of the first server.
I also tested putting random string in the userRegion URL override, and that random string will show up in E2E RTT but has no effect on the actual remote candidate.

@venturio1256
Copy link

Thanks for this! Question: How can I have a videobridge from one region being connected to two different shards like us-west and us-east ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment