bigbluebutton-Github/bigbluebutton-html5/imports/api
Daniel Schreiber c46556e1f6 Allow BBB to run behind a proxy the avoid gUM permission queries per node
The idea is to run a loadbalancer node which maps each BBB node to a
path. That way each user gets only one gUM permission query for a
cluster. The loadbalancer node only serves the html5 client, each BBB
node will serve its own API and handle the websockets for freeswitch and
bbb-webrtc-sfu.

Configuring a cluster setup
===========================

* let bbb-lb.example.com be the loadbalancer node
* let bbb-01.eaxmple.com be a BBB node

Loadbalancer
------------

On the loadbalancer node add an nginx configuration similar to this one
for each BBB node:

```
location /bbb-01/html5client/ {
  proxy_pass https://bbb-01.example.com/bbb-01/html5client/;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "Upgrade";
}

```

BBB Node
--------

On the BBB node add the following options to
`/etc/bigbluebutton/bbb-web.properties`:

```
defaultHTML5ClientUrl=https://bbb-lb.example.com/bbb-01/html5client/join
presentationBaseURL=https://bbb-01.example.com/bigbluebutton/presentation
accessControlAllowOrigin=https://bbb-lb.example.com
```

Add the following options to `/etc/bigbluebutton/bbb-html5.yml`:

```
public:
  app:
    basename: '/bbb-01/html5client'
    bbbWebBase: 'https://bbb-01.eaxmple.com/bigbluebutton'
    learningDashboardBase: 'https://bbb-01.eaxmple.com/learning-dashboard'
  media:
    stunTurnServersFetchAddress: 'https://bbb-01.eaxmple.com/bigbluebutton/api/stuns'
    sip_ws_host: 'bbb-01.eaxmple.com'
  presentation:
    uploadEndpoint: 'https://bbb-01.eaxmple.com/bigbluebutton/presentation/upload'
```

Create the following unit file overrides:

* `/etc/systemd/system/bbb-html5-frontend@.service.d/cluster.conf`
* `/etc/systemd/system/bbb-html5-backend@.service.d/cluster.conf`

with the following content:

```
[Service]
Environment=ROOT_URL=https://127.0.0.1/bbb-01/html5client
```

Change the nginx `$bbb_loadbalancer_node` variable to the name of the
load balancer node in `/etc/bigbluebutton/nginx/loadbalancer.nginx` to
allow CORS requests:

```
set $bbb_loadbalancer_node https://bbb-lb.example.com
```

Prepend the mount point of bbb-html5 in all location sections except
from the `location @html5client` section in
`/etc/bigbluebutton/nginx/bbb-html5.nginx`

```
location @html5client {
    ...
}
location /bbb-01/html5client/locales {
    ...
}
```
2021-11-20 22:13:47 +01:00
..
annotations Add try/catch on annotations methods 2021-05-04 11:38:56 -03:00
audio/client/bridge Allow BBB to run behind a proxy the avoid gUM permission queries per node 2021-11-20 22:13:47 +01:00
auth-token-validation removeUser: handle connections in frontends, db changes in backend 2021-06-30 20:08:00 +00:00
breakouts Removes prop users from BreakoutModel and add prop url_ instead 2021-10-01 13:19:01 -03:00
captions Merge pull request #13425 from pedrobmarin/f-cc-cr 2021-10-06 10:00:21 -04:00
common/server Reduce pad's hash size 2021-04-02 13:22:11 -03:00
connection-status ConnectionStatus - log info on 'warning' 2021-07-23 14:18:23 -04:00
cursor remove unused variables 2021-05-07 08:54:01 -03:00
external-videos refactor(external videos): data check 2021-06-06 13:13:16 -03:00
group-chat Add try/catch on group-chat methods 2021-05-04 16:52:05 -03:00
group-chat-msg add meetingId to chatIds selector 2021-07-29 12:42:43 +00:00
guest-users fix: re-subscribe user to guestUser collection on promotion/demotion 2021-08-04 15:34:52 +00:00
local-settings Add try/catch on local-settings methods 2021-05-05 09:27:56 -03:00
log-client/server Create ClientConnections structure and auth-token-validation collection 2020-09-01 09:07:56 -03:00
meetings Makes bbb-web provide LearningDashboard data while meeting is alive 2021-10-14 14:00:25 -03:00
note Merge branch 'v2.3.x-release' of github.com:bigbluebutton/bigbluebutton into merge-23-24 2021-10-05 17:14:46 +00:00
polls Merge branch 'v2.3.x-release' of github.com:bigbluebutton/bigbluebutton into aug6-merge 2021-08-06 15:23:36 +00:00
presentation-pods Prevent edge case where the UI show wrong info about current presenter 2021-08-04 11:02:10 -03:00
presentation-upload-token Add try/catch on presentation-upload-token methods 2021-05-05 11:25:13 -03:00
presentations Add try/catch on presentations methods 2021-05-05 11:34:36 -03:00
screenshare feat(webrtc): add EXPERIMENTAL option to disable ICE candidate signaling 2021-09-24 17:24:06 +00:00
slides Add try/catch on slides methods 2021-05-05 13:17:26 -03:00
users Prevent a case where the setInPod get stuck on a loop. close #12284 2021-09-29 13:22:18 -03:00
users-infos Add try/catch on users-infos methods 2021-05-05 13:53:28 -03:00
users-persistent-data Merge pull request #11909 from pedrobmarin/update-users-persistent-data 2021-04-07 13:26:41 -04:00
users-settings feature(layout): userdata to hide navbar 2021-10-19 20:43:33 +00:00
video-streams Merge remote-tracking branch 'upstream/develop' into add-try-catch-on-methods 2021-05-10 12:03:58 -03:00
voice-call-states Clear guestUsers, voiceCallStates and whiteboard-multi-user collections on meeting end 2021-02-09 12:44:10 -03:00
voice-users Add try/catch on voice-users methods 2021-05-05 15:05:59 -03:00
whiteboard-multi-user Add try/catch on whiteboard-multi-user methods 2021-05-05 15:53:13 -03:00