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.
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.
- 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
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
... drop build artifacts from compiling mediasoup. This reduces package
size from ~ 54 MB to ~ 12 MB.
Additionally this drops the `npm rebuild` command from the after-install
script. It should not be necessary to recompile stuff during
installation. To ensure a clean `node_modules` directory, it will be
cleaned in the before-install script.