Blog

Jitsi Recorder Server/Jibri AutoScale using aws

May 1st 2020


Jibri

Jibri is the component of jitsi which is used for recording and streaming. You can follow this instruction to install it. But there is a limitation to the jibri server.

You have to provide one jibri server for one conference recording or streaming. If you have 10 concurrent conferences you have to use 10 jibri servers to record or stream them. The number of conferences you need to record or stream may vary over time and having servers to meet the maximum capacity is an over kill. The best solution to this is to autoscale the jibri servers based on demand.


Here we have use aws services to achieve this scalability.

What are the aws services which we use for scaling

  1. CloudWatch Metrics.

    • Metrics are used to count how many jibri servers are free.
  2. CloudWatch Alarm.

    • Alarm to be triggered according to metric count.
  3. AWS ASG.

    • According to the alarm we can configure ASG to scale in or scale out.

Jibri auto scale Principal

CloudWatch Metrics is the key component in this architecture that measure how many jibri servers are free. If a jibri server is free CloudWatch Metrics increase the count by 1. We can choose the number that call RECORD_STEADY_STATE and it depends on how many jibri servers should always be free. If actual metrics count is less than RECORD_STEADY_STATE we fire scale in alarm. If metrics count greater than RECORD_STEADY_STATE we fire the scale out alarm. According to the scale in out alarm ASG spin and shutdown the servers.


You can configure the aws autoscaling group with relevant parameters to achieve this functionality.

Jibri ASG Pros and Cons

Pros

  1. You can reduce the recording servers cost since the servers would only spin up on demand.

Cons

  1. It takes a small time to spin up new servers so if there are no free servers, an user should wait until the servers spin up.

Subscribe