Wowza Community

Origin/edge live stream failover delay

I’m currently setting up a Wowza cluster, making use of a redundant origin server setup and several edge servers.

For the origin server redundancy we are making use of Linux high availability heartbeat/pacemaker to have one virtual IP address for our customers to stream to. When our main origin server fails, the ip address is moved to the other server(this happens in less than a second). The backup origin server also directly receives the stream source signal.

We chose for this setup, because the viewers of streams will not get disconnected when the switch between origin server happens(in the live application we use the virtual ip address as originURL). Unfortunately there is quite a big pause when the switch happens. The stream freezes for about 10-12 seconds before it starts playing again. Is it somehow possible to reduce the amount of time the livestream freezes? Or is it somehow possible to make viewers not get disconnected when using both origin IP’s in the originURL configuration option?

It is probably exactly 12 seconds, which is the default MediaCaster StreamTimeout. When a client connects to an edge the edge tries to get the stream from the primary origin, if no response for 12 seconds the edge will fail-over to the backup origin. You can control this timeout by adding this Property to the edge Application.xml:

<Property>
	<Name>streamTimeout</Name>
	<Value>12000</Value>
	<Type>Integer</Type>
</Property>

JW player has a nice live stream reconnector that you might find useful:

http://www.longtailvideo.com/addons/plugins/97/Livestream?q=%20alt=

Richard

Thank you for the reply Richard.

I tried setting the stream timeout to 2 seconds but unfortunately this doesn’t decrease the amount of time the stream freezes.

On our edge server applications we only use 1 originURL, this points to the IP-address that is active on the main origin server. If the main origin server fails, this ip address is taken over by our backup origin server. Because of this setup Wowza probably thinks it’s the same origin server, as it still connects to the same IP address. Could it be it takes some time for the backup origin server to buffer the stream before it’s able to restream it to the edge servers?

We prefer to use this setup as this way our customers will not have to do anything special with their flash players on their website to reconnect to the stream should the main origin server fail.

On a side-note, little question about the loadbalancer module: currently I use 2 seperate applications for one stream, one to accept the stream from an encoder and repeat the stream to the edge servers and one application purely for the loadbalancing. Is this the right way, or is it somehow possible to do those things with just one application?

Sander