# Backup encoder support

**URL:** <https://community.wowza.com/t/backup-encoder-support/94744>\
**Category:** Wowza Streaming Engine\
**Tags:** wowza-streaming-server-java-api\
**Created:** [March 25, 2022, 1:37pm UTC](https://community.wowza.com/t/backup-encoder-support/94744 "2022-03-25T13:37:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivelin\_Rusev](https://avatars.discourse-cdn.com/v4/letter/i/9fc348/32.png) [@Ivelin\_Rusev](https://community.wowza.com/u/Ivelin_Rusev)\
**Post date:** [March 25, 2022, 1:37pm UTC](https://community.wowza.com/t/backup-encoder-support/94744/1 "2022-03-25T13:37:32Z")

</div>

Hi there,

We are implementing new feature in our platform to be able to support backup encoder in case of primary encoder failure. The final goal is to have primary backup encoder support for hls streaming.

The way we implemented it is with the usage of wowza com.wowza.wms.stream.publish.Playlist API. Playlist playback will start with the main stream. It will automatically switch over to the backup stream if the main stream becomes unavailable, and again to the main stream (if available) if the backup itself becomes unavailable. After these steps, if both become unavailable we have added unavailable-stream next in the playlist. We have proven that these cases work for us:

Playback works from the Wowza link, primary should be playing VALIDATED  
Switching happens with reasonable delay (ideally max 20-30 seconds of HLS) without user intervention VALIDATED  
Killing primary stream moves automatically to backup - VALIDATED  
Killing backup moves automatically to primary - VALIDATED  
Killing both primary and backup goes to looping unavailable stream - VALIDATED

The question here is if there is a more sophisticated way of implementing primary-backup encoder switch and do you see any issues with the above approach.

Regards,  
Ivelin

---

<div class="post-metadata">

**Author:** ![Dorota\_Szafer-Kwasik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/dorota_szafer-kwasik/32/1150_2.png) [@Dorota\_Szafer-Kwasik](https://community.wowza.com/u/Dorota_Szafer-Kwasik)\
**Post date:** [March 25, 2022, 9:01pm UTC](https://community.wowza.com/t/backup-encoder-support/94744/2 "2022-03-25T21:01:40Z")

</div>

Hi.  
We have an identical modus operandi implemented. Everything works flawlessly. It would be best if all the streams used were of identical parameters /resolution, bitrate, etc./. You can combine basically anything… live from an encoder, an IP camera or a video file.
