# Live streaming to iOS - load balancing/fail-over

**URL:** <https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218>\
**Category:** Wowza Streaming Engine\
**Created:** [September 20, 2011, 10:33pm UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218 "2011-09-20T22:33:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)\
**Post date:** [September 20, 2011, 10:33pm UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218/1 "2011-09-20T22:33:50Z")

</div>

Hi,

looking at some specifications of HLS, is it possible to generate alternative locations of streams inside m3u8 file for iOS devices?

Since load balancing is not done for HLS streaming - but only Flash, how can the fail-over be taken care of in a multi edge server environment?

It seems that altenative (backup) locations can be defined. For example, using to different locations/servers for same content.

#EXTM3U

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1136296

[http://x.x.x.x:8008/livetv/_definst_/cnn.stream/playlist.m3u8](http://x.x.x.x:8008/livetv/_definst_/cnn.stream/playlist.m3u8)

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1136296

[http://x.x.y.y:8008/livetv/_definst_/cnn.stream/playlist.m3u8](http://x.x.y.y:8008/livetv/_definst_/cnn.stream/playlist.m3u8)

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=64000

[http://x.x.x.x:8008/livetv/_definst_/cnn.stream/playlist.m3u8](http://x.x.x.x:8008/livetv/_definst_/cnn.stream/playlist.m3u8)

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=64000

[http://x.x.y.y:8008/livetv/_definst_/cnn.stream/playlist.m3u8](http://x.x.y.y:8008/livetv/_definst_/cnn.stream/playlist.m3u8)

Is this possible?

Thanks!

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [September 20, 2011, 10:39pm UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218/2 "2011-09-20T22:39:04Z")

</div>

The Wowza load balancer works for any client. You can use the HTTP method of getting “least loaded server” as you form HTML for iOS device in your server page (php, asp, etc)

[https://www.wowza.com/docs/how-to-get-dynamic-load-balancing-addon](https://www.wowza.com/docs/how-to-get-dynamic-load-balancing-addon)

Richard

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [September 26, 2011, 3:33am UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218/3 "2011-09-26T03:33:43Z")

</div>

You cannot do this. It will send Wowza into an infinite loop with the player.

Charlie

---

<div class="post-metadata">

**Author:** ![Bojan\_Jovanovic](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Bojan\_Jovanovic](https://community.wowza.com/u/Bojan_Jovanovic)\
**Post date:** [September 21, 2011, 5:24am UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218/4 "2011-09-21T05:24:00Z")

</div>

Hi,

so the idea is to pull information from LoadBalancer Listener which receives statuses from all Edge servers and to update the stream URL in the client application to point to the least loaded server. Right?

The problem is that we cannot dynamically update the stream URLs.

Is there any way of using a redirect or something?

Thanks!

---

<div class="post-metadata">

**Author:** ![Bojan\_Jovanovic](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Bojan\_Jovanovic](https://community.wowza.com/u/Bojan_Jovanovic)\
**Post date:** [September 21, 2011, 12:21pm UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218/5 "2011-09-21T12:21:28Z")

</div>

Hi,

I’m trying to have an external M3U8 playlist that points to the each profile’s playlist. I do not use SMIL file, but manually created playlist (stream.m3u8).

This looks something like the example above :

#EXTM3U

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1136296

[http://x.x.x.x:8008/livetv/_definst_…/playlist.m3u8](http://x.x.x.x:8008/livetv/_definst_.../playlist.m3u8)

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1136296

[http://x.x.y.y:8008/livetv/_definst_…/playlist.m3u8](http://x.x.y.y:8008/livetv/_definst_.../playlist.m3u8)

The IPhone opens the main stream.m3u8 list and opens the first stream:

2011-09-21 13:55:14 CEST connect cupertino INFO 200

2011-09-21 13:55:14 CEST create stream INFO 200

but nothing is streamed to the client. Why is this? It should be working, right?

Thanks!

---

<div class="post-metadata">

**Author:** ![Bojan\_Jovanovic](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Bojan\_Jovanovic](https://community.wowza.com/u/Bojan_Jovanovic)\
**Post date:** [September 22, 2011, 6:33am UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218/6 "2011-09-22T06:33:26Z")

</div>

No, It starts (connect/create), but seems that it does not go into play. Quite strange because I’m referencing a direct stream - not a smil file.

I’ve tried with multiple iOS devices.

I’ll repeat this and get back to you.

In your opinion, should it work?

Thanks!

---

<div class="post-metadata">

**Author:** ![Bojan\_Jovanovic](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Bojan\_Jovanovic](https://community.wowza.com/u/Bojan_Jovanovic)\
**Post date:** [September 26, 2011, 8:48am UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218/7 "2011-09-26T08:48:52Z")

</div>

I’ve tried with a m3u8 file from Wowza (from SMIL), but just removed the wowzasessionid to get a clean m3u8 file with reference to each bitrate.

This behaviour is the same - I see it connect/open the stream but play never arrives.

Very strange…

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [September 21, 2011, 11:32am UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218/8 "2011-09-21T11:32:29Z")

</div>

There is the HTTP method of getting least loaded server, and there is the NetConnection redirect method. The latter is essentially same as a standard web page redirect (302) where the server tells the client where to go, then the client goes there. With the HTTP method you can do this in your server page, or you could do it client-side with XMLHTTPRequest (ajax).

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [September 21, 2011, 7:32pm UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218/9 "2011-09-21T19:32:09Z")

</div>

So this is not served by Wowza?

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [September 23, 2011, 12:35am UTC](https://community.wowza.com/t/live-streaming-to-ios-load-balancing-fail-over/218/10 "2011-09-23T00:35:13Z")

</div>

I don’t know

Richard
