Load Balancing Live Streaming via a Third Party Load Balancer

The following article covers the best practices when load balancing a live stream using a third party load balancer.

Encoder Side Configuration

Load balancing on the encoder side through a third party load balancing application or appliance is not advisable. Our recommendation is to load balance connections on the play out side ONLY

Also of note, on the encoder side is to ensure that Keyframe Alignment is enabled on your encoding application. In this document we reference how to achieve this in Telestream Wirecast. This is a common feature of many leading live streaming encoders please contact your vendor for further information on this subject.

Configuring your Wirecast for Load Balancing by Setting Key Frame Alignment

Output Settings > Wowza Streaming Engine > OK > Encoding (view details cog button > Check 'Keyframe Aligned' box.

You must set two Output Destinations for your live stream – one destination for each of the load balanced Wowza Streaming Engines.

Server Side Configuration

On both Wowza servers the following property needs to be enabled, which ties in with the Keyframe alignment on the Encoder side:

  • Open the Wowza Streaming Engine and log in as administrator. Navigate to Applications and click on the Live application. On the Properties tab click Custom in the Quick Links bar.

  • In the Custom section click Edit.

  • Click Add Custom Property and specify the following:
    • Path - Select /Root/LiveStreamPacketizer
    • Name - cupertinoCalculateChunkIDBasedOnTimecode
    • Type - Select Boolean
    • Value - Enter true

  • Click Add, click Save, and then restart the application.

Configuring Key Frame alignment on the encoder side and the above server-side setting on Wowza Streaming Engine should ensure the load balancing of live streaming will work, independent on any settings on the third party load balancer.

It is, however, also preferable to set or enable session stickiness or session persistence on the third party load balancer . This will enable incoming client connection to stay connected to the same Wowza Streaming Engine throughout the duration of the live stream.