Setting up Main/Backup SRT connection bonding in Callaba Cloud

Callaba Cloud
4 min readSep 30, 2022

As the title says, in this tutorial we’ll show how you can easily set up SRT connection bonding Main/Backup mode to ensure that whatever happens, you stream will continue without any major issues.

What is SRT connection bonding

A simple way to understand SRT connection bonding is to consider it a “version” of the network bonding.

Network bonding is a process of combing or joining two or more network interfaces together into a single interface. Network bonding offers performance improvements and redundancy by increasing the network throughput and bandwidth. If one interface is down or unplugged, the other one will work. It can be used in situations where you need fault tolerance, redundancy or load balancing networks.

SRT connection bonding takes this same idea (stacking a few links doing the same thing) and adds its own constraints. First of all, adding more links (or more streams) takes away bandwidth. While that’s not an issue for some, for most of the use cases this way of “stream insurance” gets taxing.

Main/Backup algorithm allows to avoid that issue as it only switches to backup line if the main one fails.

Why Main/Backup switching is cool :

  • it allows to save bandwidth, because it only uses one active stream at a time
  • if the main stream stops working for whatever reason, this mechanism switches seamlessly to the backup source and the stream continues
  • it’s possible to have more than one backup stream: all backup links will stay connected and ready for data transmission, but not activated for actual payload transmission.
  • backup links are only activated for actual transmission when the main link fails or doesn’t achieve the required throughput

If you want to learn more about how main/backup algorithm works, please refer to official SRT documentation here.

How to set up Main/Backup switching in Callaba Cloud

For this tutorial you will need your streaming sources, main one and another one to fall back to, plus a Callaba Cloud instance.

Callaba Cloud is a streaming service that supports a broad range of video industry standards. We provide simple and convenient video streaming pipeline within a single solution : input source encoding, video processing, output source decoding, live video and audio streaming, video recording, video on demand.

To keep this tutorial short and sweet, we are not going to explain the basics here. If you’ve never tried Callaba Cloud Live Streaming and this is your first time engaging with a cloud platform, please read our step-by-step manual: How to Launch Callaba Cloud.

Subscribing to Callaba Cloud will take no more than 5 minutes.

Pro tip :
Make sure you read launching tutorial to the end, so that you know how to stop your instance when your work is finished. This is important to avoid unnecessary charges.

Let’s begin

1. Log into Callaba Cloud Live Streaming dashboard

2. Go to SRT Servers section
Click “Add New”

In the page that opens

Name your server

Port : specify port (in our case 9003)

Scroll down to the Routing Settings

SRT Routing : Public IP

Routing mode : Pull

In our example we’re going to be pulling both of our streams (the main one and the backup one).

Now all we need to do is to specify our sources (Hosts).

Routing Host IP : specify your source IP

Routing SRT Port : specify port

The same way we’ll have to add our backup source.

Click “+ Add SRT Host”

Routing Host IP : specify your backup source IP

Routing SRT Port : specify backup source port

If you have more backup sources, add them the same way

Click Save

Cool. Done. Now Callaba will switch to backup in case if main stream get interrupted.

Pro tip :

To see your incoming / outgoing bitrate you’ll need to set up some kind of a receiver for your stream. A receiver can be a player, a recording process, a restream, for example. Or you can grab the stream any other way.

This is the end of this tutorial.

If you have any questions, please contact us at: support@callabacloud.com
We will respond to you within 48 hours.
Happy streaming!

Related articles :
How to launch Callaba Cloud Live Streaming
How to start streaming in OBS Studio over the SRT Protocol
How to multi-stream from OBS Studio to Twitch, Youtube and Facebook
How to multi-stream from Wirecast to Twitch, Youtube & Facebook

--

--

Callaba Cloud

Cloud-based service for broadcasting high quality video and audio over the SRT Protocol. Streaming, Multistreaming to social platforms and Recording.