34
Failover Protection
If your playlist contains alternate streams, they can not only operate as bandwidth or device
alternates, but as failure fallbacks. Starting with iPhone OS 3.1, if the client is unable to reload the
index file for a stream (due to a 404 error, for example), the client attempts to switch to an alternate
stream.
In the event of an index load failure on one stream, the client chooses the highest bandwidth
alternate stream that the network connection supports. If there are multiple alternates at the same
bandwidth, the client chooses among them in the order listed in the playlist.
You can use this feature to provide redundant streams that will allow media to reach clients even
in the event of severe local failures, such as a server crashing or a content distributor node going
down.
To implement failover protection, create a stream, or multiple alternate bandwidth streams, and
generate a playlist file as you normally would. Then create a parallel stream, or set of streams, on a
separate server or content distribution service. Add the list of backup streams to the playlist file, so
that the backup stream at each bandwidth is listed after the primary stream. For example, if the
primary stream comes from server ALPHA, and the backup stream is on server BETA, your playlist file
might look something like this:
Note that the backup streams are intermixed with the primary streams in the playlist, with the
backup at each bandwidth listed after the primary for that bandwidth.
You are not limited to a single backup stream set. In the example above, ALPHA and BETA could
be followed by GAMMA, for instance. Similarly, you need not provide a complete parallel set of
streams. You could provide a single low-bandwidth stream on a backup server, for example.
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=200000
http://ALPHA.mycompany.com/lo/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=200000
http://BETA.mycompany.com/lo/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=500000
http://ALPHA.mycompany.com/md/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=500000
http://BETA.mycompany.com/md/prog_index.m3u8
A Review of HTTP Live Streaming!
Andrew Fecheyr-Lippens
15