Wowza Community

Origin redundancy setup

Hi all,

I have a question, which I hope I can explain clearly, and would appreciate any help or guidance.

I’ll be using Wirecast via Fibre broadband to send a high quality stream to an EC2 Wowza instance with a transcoder running which will generate 3 different bit-rates.

For a backup, I will be using Wirecast via a 3G modem to another EC2 Wowza instance but this time without the transcoder because it’s a cheaper, lower power instance, so the server will only have 1 version of the stream and not 3 as above.

What’s the best way for my main EC2 server acting as an Origin/Edge to speak to my backup EC2 and re-stream my backup single stream to the 3 multi-bitrate versions my web player (JW Player) would expect if my main broadband went down?

Again, hope that makes sense and thanks in advance,

Alex

Hi Alex, you can configure a live stream repeater and use the fail-over feature.

How to configure a live stream repeater

Setting up originURL(s)

NOTE: In the event that the primary origin server fails, clients may experience up to a 12-second timeout before failover to the backup origin server is completed.

Salvadore

The failover feature of Live Repeater that Sal mentions is the only built-in failover feature in Wowza. It works for new clients only however, but does nothing for playback clients that have already started streaming.

To use the Liverepeater failover effectively you would need at least 3 servers, two origins and an edge. Using a .stream file on the edge you would reference both servers with pipe (|) delimiter, like this:

rtmp://[wowza-primary-origin]/liveorigin/myStream|rtmp://[wowza-backup-origin]/liveorigin/myStream

The failover works when the primary is not reachable. It doesn’t work if the stream is not found, playback will just not work.

All that works for new connections, but a client that is streaming already will probably have to reconnect. If you are using JW player you can do something like this:

<script type="text/javascript">
    jwplayer("player").setup({
   	sources: [{
				file: "rtmp://localhost:1935/live/myStream"
			},{
				file: "http://localhost:1935/live/myStream/playlist.m3u8"
		}]
    });
    	jwplayer("player").onError ( function(event) {
			setTimeout(function()
			{
				jwplayer("player").play(true);
			},2000);
		}
	);
</script>

Each Transcoder rendition is a live stream in the origin, and is handled as any live stream. If you are doing RTMP Dynamic Streaming (some players like JW Player do this) you should follow this guide:

https://www.wowza.com/docs/how-to-lock-multi-bitrate-streams-on-live-stream-repeater-edge

Richard

It works for new clients only however, but does nothing for playback clients that have already started streaming.

If not for clients already connected, what are the “12-second timeout” for then?

Hi Salvadore,

Ok, so it’s possible? I’m unsure how I go about making sure the backup single stream is ‘seen’ by the clients?

I’m confused how the live stream repeater works with the transcoder, could anyone point me in the right direction?

Hi Richard,

Thanks for clearing up how the failover is meant to work, I hadn’t realised it was for that use. Perhaps a feature to add in future Wowza versions??

In that case, I probably don’t need to run my main server in origin/edge mode?

As an alternative, is it possible to manually force my backup stream into the main server’s transcoder in the event of a problem?