Installing and Scaling BBB
Installing and Scaling BBB
Conferencing Platform
BigBlueButton
• Introduction to BigBlueButton
• BBB installation choices
• BBB minimum server requirements
• BBB front-end
• Turn Server
• Introduction to Scalelite
• Architecture of Scalelite
• NFS shared volume
• PostgreSQL setup
• Redis Cache setup
• Deploying Scalelite Containers
Installing BigBlueButton
What is BBB?
• When installing BigBlueButton you have two choices: bbb-install.sh and step-by-
step.
• Regardless of which choice you make, to have a successful installation you need to:
• obtain a dedicated server,
• ensure the server meets BigBlueButton’s minimum set of requirements,
• assign a hostname (recommended to set up SSL), and
• configure the server’s firewall (if needed).
Installing BigBlueButton
Minimum Server Requirements
• BigBlueButton normally requires a wide range of UDP ports to be available for WebRTC communication. In
some network restricted sites or development environments, such as those behind NAT or a firewall that
restricts outgoing UDP connections, users may be unable to make outgoing UDP connections to your
BigBlueButton server.
• The TURN protocol is designed to allow UDP-based communication flows like WebRTC to bypass NAT or
firewalls by having the client connect to the TURN server, and then have the TURN server connect to the
destination on their behalf.
• You need a separate server (not the BigBlueButton server) to setup as a TURN server. Specifically you need:
• An Ubuntu 18.04 server with a public IP address
• On the TURN server, you need to have the following ports (in additon port 22) availalbe for
BigBlueButton to connect (port 3478 and 443) and for the coturn to connect to your BigBlueButton
server (49152 - 65535).
Installing BigBlueButton
Turn Server
• To load balance the pool, Scalelite periodically polls each BigBlueButton to check if
it is reachable online, ready to receive API requests, and to determine its current
load (number of connected users). With this information, when Scalelite receives an
incoming API call to create a new meeting, it places the new meeting on the least
loaded server in the pool. In this way, Scalelite can balance the load of meeting
requests evenly across the pool.
• Many BigBlueButton servers will create many recordings. Scalelite can serve a large
set of recordings by consolidating them together, indexing them in a database, and,
when receiving an incoming getRecordings, use the database index to return quickly
the list of available recordings.
Scaling BigBlueButton
Before you begin
The Scalelite installation process requires advanced technical knowledge. You should, at a
minimum, be very familar with:
• Setup and administration of a BigBlueButton server
• Setup and administration of a Linux server and using common tools, such as systemd, to
manage processes on the server
• How the BigBlueButton API works with a front-end
• How docker containers work
• How UDP and TCP/IP work together
• How to administrate a Linux Firewall
• How to setup a TURN server
Scaling BigBlueButton
Architecture of Scalelite
For the Scalelite Server, the minimum recommended server requirements are:
•4 CPU Cores
•8 GB Memory
For the external Postgres Database, the minimum recommended server requirements are:
•2 CPU Cores
•2 GB Memory
•20 GB Disk Space (should be good for tens of thousands of recordings)
For the external Redis Cache, the minimum recommended server requirements are:
•2 CPU Cores
•0.5GB Memory
•Persistence must be enabled
Scaling BigBlueButton
Setup a pool of BigBlueButton Server
•PostgreSQL, or Postgres, is a relational database management system that provides an implementation of the SQL querying
language. It is a popular choice for many small and large projects and has the advantage of being standards-compliant and
having many advanced features like reliable transactions and concurrency without read locks.
•You can install Postgres on a dedicated server or install it on the same server as Scalelite.
•Ubuntu’s default repositories contain Postgres packages, so we can install these easily using the apt packaging system.:
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
•Using PostgreSQL Roles and Databases
•By default, Postgres uses a concept called “roles” to handle in authentication and authorization. These are, in some ways,
similar to regular Unix-style accounts, but Postgres does not distinguish between users and groups and instead prefers the
more flexible term “role”.
•Upon installation Postgres is set up to use ident authentication, which means that it associates Postgres roles with a matching
Unix/Linux system account. If a role exists within Postgres, a Unix/Linux username with the same name will be able to sign in as
that role. So, you’ll need to create a new user called scalelite on your server as well as creating DB user named scalelite.
Scaling BigBlueButton
Setup up a PostgreSQL Database
•If you install Postgres on the same machine as Scalelite then you can define the url of your DB in /etc/
default/scalelite like this:
DATABASE_URL=postgresql://IPofScalelite:5432
•But if you have installed on a dedicated server, here is how you would define it:
postgresql://username:password@connection_url
•You have to enable remote login in postgresql.conf:
listen_addresses = ‘*'
•pg_hba.conf also needs to be edited to allow Scalelite docker IP addresses and users to access postgres
like this:
host scalelite scalelite 172.18.0.2/32 trust
host scalelite scalelite 172.18.0.3/32 trust
Scaling BigBlueButton
Setup a Redis Cache
•Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.
•You can install Redis on a dedicated server or install it on the same server as Scalelite.
•Ubuntu’s default repositories contain Redis packages, so we can install these easily using the apt packaging system.:
sudo apt-get update
sudo apt-get install redis-server
Next is to enable Redis to start on system boot
sudo systemctl enable redis-server.service
•You can configure Redis as you need by editing redis.conf file which is well documented
•You have to enable Redis remote login like this:
bind 0.0.0.0 or
bind IPofScalelite
• You can easily install Redis using docker allowing access only from Scalelite docker network and enabling persistence on your Redis server:
First create Redis’s env file /etc/default/redis with content of: REDIS_DATA_DIR=/mnt/redis
Then run the docker container:
/usr/bin/docker run --name redis --env-file /etc/default/redis --network scalelite --hostname redis -v ${REDIS_DATA_DIR}:/data redis redis-server --appendonly yes
• This will save alot of time you would have spent why Redis is not persisting the servers you configure on Scalelite. Set the redis_url in Scalelite env file /etc/default/scalelite:
REDIS_URL=redis://redis
Scaling BigBlueButton
Deploying Scalelite Docker Containers