Commit Graph

61 Commits

Author SHA1 Message Date
Paulo Lanzarin
89209fc7ee
feat(audio): dedicate mediasoup workers for audio streams
mediasoup workers are currently for general use,
regardless of stream type. This makes it difficult to give
different scheduling priorities for audio workers or prevent
noise from video streams, when our goal is to give higher
priority to audio in all ends of the system.

Set `mediasoup.dedicatedMediaTypeWorkers.audio` to `auto`. This will spin up 
`ceil((min(nproc, 32) * 0.8) + (max(0, nproc - 32))` mediasoup workers 
dedicated to handling audio streams.
2024-08-20 15:06:32 -03:00
Tainan Felipe
4d6f4b3ded
Refactor: Make bundle using webpack (#20811)
* Refactor: Make bundle using webpack

* Fix: restore after install codes and a few settings

* Fix: build script folder permission

* Refactor: Remove support to async import on audio bridges

* Upgrade npm using nvm

* Avoid questions on npm ci execution

* Let npm ci install dev dependencies (as we need the build tools here)

* Fix: enconding

* Fix: old lock files

* Remove: bbb-config dependency to bbb-html5 service, bbb-html5 isn't a service anymore

* Fix: TS errors

* Fix: eslint

* Fix: chat styles

* npm install with "lockfileVersion": 3 (newer npm)

* build: allow nodejs 22

* node 22; drop meteor from CI and bbb-conf

* TEMP: use bbb-install without mongo but with node 22 and newer image

* build: relax nodejs condition to not trip 22.6

* build: ensure dir /usr/share/bigbluebutton/nginx exists

* init sites-available/bbb; drop disable-transparent-

* nginx complaining of missing file and ;

* TMP: print status of services

* WIP: tweak nginx location to debug

* Fix: webcam widgets alignments

* akka-apps -- update location of settings.yml

* build: add locales path for nginx

* docs and config changes for removal of meteor

* Fix: build encoding and locales enpoint folder path

* build: set wss url for media

* Add: Enable minimizer and modify to Terser

* Fix: TS errors

---------

Co-authored-by: Tiago Jacobs <tiago.jacobs@gmail.com>
Co-authored-by: Anton Georgiev <anto.georgiev@gmail.com>
Co-authored-by: Anton Georgiev <antobinary@users.noreply.github.com>
2024-08-09 13:58:44 -04:00
Paulo Lanzarin
936363b310 feat(bbb-webrtc-sfu): enable new mediasoup balancing strategies
We currently use a simple producer round-robin algorithm to distribute
elements between mediasoup workers. This works for most scenarios but
fails in some edge cases, such as:
  - 1-to-N scenarios where N >= ~600-800 (sample number, varies by
  single-core performance). This is due to subscribers being pinned to a
  producer's worker.
  - Poor distribution results from round-robin.

Enable the following new features in bbb-webrtc-sfu via after-install by
default:
  - `mediasoup.workerBalancing.strategy: least-loaded`: Replaces
  round-robin with load scoring. Workers are selected based on which is
  least loaded.
  - `mediasoup.enableWorkerTransposing: true`: Allows media streams to be
  bridged between workers through internal RTP pipes. This, along with a
  per-worker stream limit, enables seamless offloading of streams between
  workers (whether publishers or subscribers). The per-worker stream limit
  is still under review.

These changes should address the issues mentioned. They are enabled via
after-install because the SFU version is shared with previous BBB versions
where these features are not desirable yet.
2024-08-01 18:21:07 +00:00
Anton Georgiev
fabcb7a3ef
build: Clean up sfu after-install (#20595) 2024-06-27 19:24:37 -04:00
Ghazi Triki
7b4c506bc5 Update logrotate rule to add date extension to archived logs files. 2024-05-24 11:34:24 -04:00
Anton Georgiev
ef300cf28e
chore: Fix typo (found by typos) (port) #19834
Co-authored-by: Stefan Weil <sw@weilnetz.de>
2024-03-18 09:58:53 -04:00
Anton Georgiev
ec9adc0266 build: drop yq 3 requirement on "develop" 2023-09-14 10:19:04 -04:00
Gustavo Trott
d119b51f6f
Update build/packages-template/bbb-webrtc-sfu/build.sh
Co-authored-by: Anton Georgiev <antobinary@users.noreply.github.com>
2023-09-11 14:49:05 -03:00
Gustavo Trott
09a0cce918
Update build/packages-template/bbb-webrtc-sfu/build.sh
Co-authored-by: Anton Georgiev <antobinary@users.noreply.github.com>
2023-09-11 14:48:52 -03:00
Gustavo Trott
9da3543bc3 Resolve conflicts 2023-09-11 11:25:56 -03:00
Anton Georgiev
7b271c97a1 chore: Merge 2.6.14 into v2.7.x-release 2023-09-06 14:33:15 -04:00
Anton Georgiev
eae34304be build: fix nodejs version paste error in #18686 2023-09-02 06:49:29 -04:00
Anton Georgiev
89d17ff639 build: require node 18 to install bbb packages 2023-09-01 08:19:50 -04:00
Anton Georgiev
aa7c649b2c build: fix mismatched quote 2023-08-31 07:23:18 -04:00
Anton Georgiev
1159e7af3c build: resetting mcs-address from localhost to 127.0.01 2023-08-30 17:19:39 -04:00
Paulo Lanzarin
a3759f681f
build(bbb-webrtc-sfu): use bbb-webrtc-recorder, drop kurento from config
- Set bbb-webrtc-recorder as the default `recordingAdapter` in bbb-webrtc-sfu by default
  - Set `kurento` in SFU's config to an empty array; Kurento isn't provided by 2.8+ by default
2023-08-22 17:55:34 -03:00
Anton Georgiev
a3f07f700f made bbb-graphql-server dep of bbb-html again 2023-07-20 08:18:58 -04:00
Anton Georgiev
543be9e44e sfu after-install to not mention kurento 2023-07-19 20:31:02 -04:00
Anton Georgiev
334a83a1b2 change yq syntax in sfu after-install 2023-07-19 10:24:52 -04:00
Gustavo Trott
5681e88c60 Merge 2.7 into Develop 2023-06-26 17:21:01 -03:00
Anton Georgiev
ff086191ae
build: fix mismatched quote 2023-06-21 09:14:32 -04:00
Anton Georgiev
3b5062ed16
build: resetting mcs-address from localhost to 127.0.01 2023-06-21 08:58:23 -04:00
Anton Georgiev
ba8e8cf16a build-config: change yq syntax to v4.16.2; readded yq as dep 2023-04-27 16:37:26 -04:00
Anton Georgiev
bc24daf5ff build: drop openh264-gst-plugins-bad-1.5 sfu dependency 2023-04-27 14:08:27 -04:00
Anton Georgiev
4d7cae4e71 build: (TEMP) drop yq as a dependency -- it is a script not package on 22.04 2023-04-27 13:35:15 -04:00
Anton Georgiev
d64a00fa5b build: upgrade yq 3 to 4 for packaging 2023-04-26 16:26:51 -04:00
Anton Georgiev
0fccb78ee1 build-conf: Remove Kurento dependency; Run on Ubuntu 22.04 2023-04-25 15:08:36 -04:00
prlanzarin
538954a6ae build: add bbb-webrtc-recorder 2023-04-20 16:24:34 -03:00
Paulo Lanzarin
9ef74eeb53
fix(bbb-webrtc-sfu): add ALLOW_CONFIG_MUTATIONS to service
After node-config was bumped to 3.3.9 (from 3.3.6), it started throwing errors if
configurations are mutated without the ALLOW_CONFIG_MUTATIONS env var set.
We mutate some configs directly, but I every time I added one of those I made sure that
they are always deep cloned.

However, we hit an issue with kurento-client mutating a config input, which is an indirect mutation.
So, to prevent further surprises I'm allowing mutations on production while prohibiting them in dev
envs until I'm 100% sure nothing, direct on indirect, improperly mutates configuration values.
2023-03-13 12:20:00 -03:00
prlanzarin
ef7b1fb3e5 build: use FIFO scheduler in bbb-webrtc-sfu
bbb-webrtc-sfu (and mediasoup) are running in the CFS scheduler which
means it has to compete with (much) lower priority tasks like
presentation conversion, recording processing, [...]
Since it encompasses an RTC application which also handles audio, it
should be _at least_ on the same scheduling policy as FS/bbb-html5 - and
that should be safer now  with mediasoup which has a lower footprint
(and generates lower CPU noise overall).

This commit puts bbb-webrtc-sfu in the FIFO scheduling policy (same as
bbb-html5). Also bumps bbb-html5 nice level up to 18 and sets SFU to
nice 19 (so bbb-html5 has some advantage when push comes to shove).

This can be improved further by using per-process priorities in SFU.
Ideally we'd want mediasoup audio workers and mcs-core to be the same
priority as FS (so higher than bbb-html5), but the rest of them
(video/screen workers) to be the same or lower than bbb-html5. For
future reference:
  - https://github.com/bigbluebutton/bbb-webrtc-sfu/commit/3e245122dfa155ecb77b536eeadac1e4607cee
  - 66d443d204
2022-08-26 14:08:24 +00:00
Ramon Souza
db5ac1428a Merge tag 'v2.5.3' into merge25-26-jul14 2022-07-15 11:08:02 -03:00
Anton Georgiev
55dbc34984
Merge pull request #14616 from danimo/bbb-target
build: Introduce bigluebutton.target
2022-07-06 14:42:09 -04:00
prlanzarin
6225042148 feat: add user name to checkAuthorization response
Audio's callerId depends on the user name and there isn't
an "on-demand" way of fetching that field internally, making callerId
assembly with trusted attributes (server-side generated) impossible in
bbb-webrtc-sfu.

The new extra header (User-Name, mapped to user_name in the proxied
connection) allows fetching the user name field in a cheap way and
consequently provides a cheap+safe way of assembling the callerId.

Alternatives I've considered but discarded:
  - a new akka-apps req-resp pair for fetching the user name (+overhead)
  - a new akka-apps req-resp pair for generating the callerId (+overhead)
  - piggybacking on GetMicrophonePermissionReq/Resp to generate the
    callerId (same overhead, but mixing responsabilities)
2022-06-28 20:33:36 +00:00
Daniel Molkentin
a7f43ba2b8 Merge remote-tracking branch 'origin/v2.6.x-release' into bbb-target 2022-06-27 17:03:01 +02:00
Daniel Schreiber
1a12514b61 Fix(build): add service dependency to redis for several services
* fix unit name: the unit name on Ubuntu is `redis-server.service`
* services which need a working redis require both After= and Wants=

See the description in the `systemd.unit` man page.
2022-05-29 22:31:03 +02:00
Calvin Walton
09124ab06c packaging: Add dependencies on yq 3
yq package is now provided in the BigBlueButton support PPA for BBB 2.5,
so we can depend on the package now. Ensure the dependency is specific
to avoid an incompatible yq version 4 from being installed.
2022-04-25 15:04:38 -04:00
Anton Georgiev
97dbc1aeb6
Merge branch 'v2.5.x-release' into bbb-target 2022-04-01 14:21:15 -04:00
Anton Georgiev
33a2dd566c build: do not delete .nginx file, it is removed on upgrade too 2022-03-18 19:02:46 +00:00
Daniel Molkentin
9f833a4760 Introduce bigbluebutton.target 2022-03-17 11:35:42 +01:00
Anton Georgiev
4e6b0a608e refactor: store nginx files in /usr/share/bigbluebutton/nignx not /etc/bigbluebutton/nginx 2022-03-15 01:42:28 +00:00
Anton Georgiev
20bff96cbf must revert! build: temp drop yq as a dependency 2022-03-14 19:39:11 +00:00
Anton Georgiev
3de540f0ab build: swap bionic with focal 2022-03-14 19:04:23 +00:00
Anton Georgiev
7147045a82 build: renamed opts-bionic to -focal 2022-03-14 18:53:35 +00:00
Anton Georgiev
57776054b7
Merge pull request #14512 from prlanzarin/u25-nest-5900pn
refactor: reduce timeout intervals for webrtc-sfu and FS WebSocket proxies
2022-03-03 15:27:37 -05:00
prlanzarin
22d347f899 refactor: reduce timeout intervals for webrtc-sfu and FS WebSocket proxies
The old 6h values seem far too large and I cant recall nor find any good
justification for them to be that way

Reducing the timeouts to more sane values allow resources (WebSockets) to be
cleaned up faster

The heartbeat routine in bbb-webrtc-sfu runs every 20s. The heartbeat
routine in SIP.js/FS runs every 30(+10)s. The new timeouts are those values
multiplied by 3.
2022-03-02 19:07:29 -03:00
Anton Georgiev
8674cf7615 !build: remove config storing to /tmp when upgrading a package
Remaining, to be handles separately:
bbb-html5 before-remove and after-install -- sip.nginx needs to be
handled in bbb-conf
bbb-freeswitch-core -- /tmp/vars xml, etc. -- not sure how to handle
2022-02-27 19:08:25 +00:00
Anton Georgiev
0c9de5746f build: drop xenial related files 2022-01-27 19:42:07 +00:00
prlanzarin
896f629a94 chore: pipe user info from bbb-web checkAuth to webrtc-sfu 2021-12-03 19:49:27 +00:00
Daniel Schreiber
b30b3accf3 build: fix bbb-webrtc-sfu cronjob
the cronjob queries the number of users. The query was still from BBB 2.2
and returned always 0. Now we take every user into account.
2021-11-10 22:22:10 +01:00
Paulo Lanzarin
245311947d
Update build/packages-template/bbb-webrtc-sfu/build.sh
Co-authored-by: schrd <schrd@users.noreply.github.com>
2021-10-25 14:00:24 -03:00