Region Based Bridge Selection Strategy is not working for videobeidge

We have one jitsi-meet server and 2 video bridges in different geo-locations. We performed all the configuration from this article (jitsi-videobridge/octo.md at master · jitsi/jitsi-videobridge · GitHub) but still, the selection of video bridge is load based only. I haven’t defined deployment info on the meet server. Is it required?

@damencho @bbaldino please suggest something

For region based strategy to work, incoming users should be “tagged” by some region information and that information needs to propagate to deployment info served by jitsi-meet-web, ie. it must appear in config.js. Users coming from different regions should have different result value in config.js.
We use aws route53 geolocation to send users to our proxy, that adds geo information to header and send request with that header to jitsi-meet-web, which inserts this information to deployment info and serves config.js with this info in it.

@nosmo and @damencho : I am a little bit confused with this header sent to jitsi-meet-web. If i can determine the provenance of the user request (for example simply by its origin IP for the simplicity of explanation) - with any mechanism I want to use - which kind of header should be sent to the Jitsi-meet deployed on my server.? the following info:
deploymentInfo: {
shard: “shard1”,
region: “RegionA”,
userRegion: “ZoneA”
},

Needs to be sent via header and not present in the config.sys? Can I also do it at the jitsi-meet NGINX level?
Thanks

@venturio1256
we send traffic to nginx reverse proxy based on geo location via aws route 53, that nginx for each geo has its own config of value for our custom header:

            proxy_set_header        JVBREGION $jvb_region;

($jvb_region holds value for this geo location, lets say “europe”)

in nginx that serves the jitsi app we have this SSI snippet in jitsi config.js:

deploymentInfo: {
region: “<!–#echo var=“HTTP_JVBREGION” -->”,
}

which fills in the region (“europe”) info for jicofo. Custom header can be named how you want, i recommend not to use any “_” or “-” in name.
SSI needs to be enabled on nginx that serves the jitsi app.

Thanks! This was clear. And worked fine. Finally I did not use route 53 and changed my architecture and used the iFrame API, which allow to configure config.sys externally directly by overwriting it

Hi nosmo,
could you help me
I have 1 jms and 3 jvbs (in different city) in private network, the server information as bellow

jms (172.20.xxx.xxx): prosody,jicofo,meet-web,meet-web-config
  jvb1 (172.21.xxx.xxx): videobridge2
  jvb2 (172.22.xxx.xxx): videobridge2
  jvb3 (172.23.xxx.xxx): videobridge2

first question should I need to install meet-web and meet-web-config on jvbs ?
already config octo, it it seems work with the setting

bridge {
    selection-strategy = SplitBridgeSelectionStrategy
    }

five people join the meeting,and they are in different videobridge2, but not the videobridge2 in the own region

it’s already configure the region information in "/etc/jitsi/videobridge/sip-communicator.properties "

org.jitsi.videobridge.octo.BIND_ADDRESS=172.21.xxx.xxx
org.jitsi.videobridge.octo.PUBLIC_ADDRESS=172.21.xxx.xxx
org.jitsi.videobridge.octo.BIND_PORT=4096
org.jitsi.videobridge.REGION=region1

could you help me
how to configure the geoip2 in nginx for regional load balancing
maybe need to change the setting in /etc/nginx/nginx.conf on jms,but I’m newer to nginx
and where is the deploymentinfo (jms or jvb)?

thanks

@zlblade you don’t have to install meet-web on jvbs and i wouldn’t recommend doing that.

I don’t understand what you are trying to achieve here - SplitBridgeSelectionStrategy is mainly for testing octo, so it seems to work as expected - that every new client will end up on different bridge. If you want to use geo regions, than you have to use RegionBasedBridgeSelectionStrategy. Read the docs.

geoip2 - never used, can’t help you here.
If you are new to nginx, than learn a bit about nginx at first, hard to provide you with some advice.
For the rest, read this thread and forum, i think everything was already explained here many times.

@nosmo
thanks for you quick reply
yes, I understand the SplitBridgeSelectionStrategy is used to testing octo
and I will change it at the end to

bridge {
    selection-strategy = RegionBasedBridgeSelectionStrategy
    }