Scalelite lazy deployment

All-in-one manual deployment on AWS using docker-compose

Scalelite is an open-source load balancer, designed specifically for BigBlueButton [1], that evenly spreads the meeting load over a pool of BigBlueButton servers. It makes the pool of BigBlueButton servers appear to a front-end application such as Moodle [2], as a single and yet very scalable BigBlueButton server.

It was released by Blindside Networks [3] under the AGPL license on March 13, 2020, in response to the high demand of Universities looking into scaling BigBlueButton as a result of the COVID-19 pandemic [4].

The full source code is available on GitHub and pre-built docker images can be found on DockerHub.

Architecture

At a high level, the general idea is that Scalelite is placed in front of a pool of BigBlueButton servers, acting as a Proxy for all of them.

Scalelite has four main components:

The proxy:

A custom build of nginx that includes configuration files for handling the requests in the same way BigBlueButton does.

The frontend API

The RoR application that implements the BigBlueButton API and handles the demand and distributes to the actual BigBlueButton servers.

The meeting poller

A Ruby script that is run as a scheduled task for polling the status of the BigBlueButton servers registered.

The recording importer (scalelite-recording-importer)

A Ruby script that is run as a scheduled task for importing the recording feed by the BigBlueButton servers into the database.

In a nutshell, Scalelite components interact as in this diagram:

And each component is bundled in its own Docker image.

In a deployment that involves multiple machines and perhaps even a distributed load through multiple nodes, scalelite-nginx and scalelite-api should coexist and still be deployed together in the same host. The other two, scalelite-poller and scalelite-recording-importer, can alternatively be deployed on the same or separate boxes. One thing to notice though is that there should be one and only one instance of the scalelite-recording-importer.

Single node deployment

The simplest way to deploy Scalelite is on a single node that runs all its components and services required. And although this may certainly not be our preferred choice for a production environment, it may be appealing for those getting started with this kind of deployments or those who have budgetary restrictions.

A big warning here is that you must keep in mind that this deployment won’t give you HA by any means. The more load you put on a single node, the more risk you are in of going down when you less would like.

That being said, let’s dive into the details of deployment.

This deployment makes use of Amazon Web Services, which is a Cloud infrastructure that is assumed that you are familiar with already.

  • 1 VPC
  • 1 EC2 instance, (recommended no less than a t3.small), which for the effects of this tutorial will hold Ubuntu 18.04.
  • Route 53 Hosted Zone (example.com)

Updating the VM

Adding swap memory

To make the change permanent add the line

To the file

Installation

Create a new .env file based on the dotenv file included.

Most required variables are pre-set by default, the ones that must be set before starting are:

Obtain the value for SECRET_KEY_BASE with:

You should see something like this:

Obtain the value for LOADBALANCER_SECRET with

You should see something like this:

Set the hostname on URL_HOST (E.g. scalelite.example.com)

When using a SSL certificate set NGINX_SSL to true

Your final .env file should look like this:

For using a SSL certificate signed by Let’s Encrypt, generate the certificates.

Start the services.

Now, the scalelite server is running, but it is not quite yet ready. The database must be initialized.

Configuration

It is important to mention that Scalelite doesn’t have a UI for administration. Instead it comes with a set of back-end scripts (rake tasks) that must be run using the Command Line for configuring and managing the BigBlueButton servers that will be used.

You can check the server status.

You should notice that there are no servers configured. That can also be verified with pulling the list of servers.

But you can add some BigBlueButton servers.

That should give you an ID for each server added.

Use the server ID for enabling the server.

And lastly, although the poller will update the servers. It can also be run manually.

Additionally, the servers can be also be disabled.

Taken out of the pool.

Or removed.

For more detailed information regarding server management, read the README file in the official git repository. https://github.com/blindsidenetworks/scalelite.

Using BigBlueButton servers through Scalelite

Your BigBlueButton servers are now ready to be used. You can use Scalelite with any external application (such as Moodle or Wordpress) by setting its hostname as the BigBlueButton URL and the secret generated (LOADBALANCER_SECRET) during the installation as the BigBlueButton Secret.

Handling recordings

This setup does not include the settings for enabling Scalelite to handle recordings. For a more details in reference on that particular topic see the article Scalelite lazy deployment (Part II)

That’s it!, enjoy.

References

[1] BigBlueButton. In Wikipedia. Retrieved Apr 27, 2020 from https://en.wikipedia.org/wiki/BigBlueButton

[2] Moodle. In Wikipedia. Retrieved Apr 27, 2020 from https://en.wikipedia.org/wiki/Moodle

[3] Blindside Networks. In Blindside Networks website. Retrieved Apr 27, 2020 from https://blindsidenetworks.com/about-us/

[4] Schaffhauser, Dian (Mar 03, 2020). Coronavirus Pushes Online Learning Forward. Retrieved Apr 27, 2020 from https://campustechnology.com/articles/2020/03/03/coronavirus-pushes-online-learning-forward.aspx

Common Issues

  1. Server is still offline. This commonly happens because when adding the BigBlueButton server, the format shown in this tutorial MUST be used. Notice the /api/ that is included as part of the URL. When running bbb-conf - -secret in the BigBlueButton server, the URL presented does not include that part.

Senior Software Engineer & active polyglot coder. Passionate for making the applications that shape our world. Work @BlindsideNetwks @BigBlueButton

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store