Unreal Media Server Forum Index Unreal Media Server
ATTENTION! THIS FORUM IS READ ONLY AS OF SEPTEMBER 1 2009.

PLEASE POST QUESTIONS TO OUR NEW FORUM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Streaming live feeds and load balancing

 
Post new topic   Reply to topic    Unreal Media Server Forum Index -> Streaming Files
View previous topic :: View next topic  
Author Message
bostunes



Joined: 20 Feb 2007
Posts: 17

PostPosted: Tue Feb 20, 2007 5:41 am    Post subject: Streaming live feeds and load balancing Reply with quote

Hello,

Has anyone done this? I would be interested to hear of your experiences, any pitfalls, and details of your setup you are willing to share.

Thank you.
Back to top
View user's profile Send private message
Admin
Site Admin


Joined: 04 Aug 2006
Posts: 488

PostPosted: Tue Feb 20, 2007 5:36 pm    Post subject: Reply with quote

Please be more detailed when you say "Load Balancing"

Traditional load balancing is not 100% applicable in this case; other aspects become more important if your target is 100% fault tolerant streaming delivery system.

Traditional load balancing applies to server resources load, such as CPU and memory.
However you can notice that Media Server, receiving live feeds from other remote computers, does not consume much CPU.
Even with hundreeds of concurrent unicast clients, the server CPU remains quite low - refer to performance chart at the bottom of
http://www.umediaserver.net/Unreal%20Media%20Server%20Specs.pdf

If you still want to employ load balancing, then you will need to do it yourself - for example your web app can ask 3 Media Server computers - what is your current load? and then compose the web page that calls UseMediaServer(serverIP) metod of ActiveX control, where serverIP will be the IP of Media Server which is less busy than others.

More important aspect here is availability of your Media Server and bandwidth: make sure your Media Server computer's internet connection is reliable - may be redundant with 2 Nics; if ActiveX fails to connect to the first IP address, handle the error yourself and connect to second IP address.
Bandwidth - use multicast and/or delegate live broadcasts when you can,
minimize traffic over low-bandwidth network segments.

Admin
Back to top
View user's profile Send private message Send e-mail
bostunes



Joined: 20 Feb 2007
Posts: 17

PostPosted: Wed Feb 21, 2007 8:27 am    Post subject: Reply with quote

I was thinking in terms of bandwidth allocation. However I can't see how to sync the live feeds with the streams. Ideally I would like to have the live feeds connect to ONE IP address, but have each stream available on mutliple computers, so clients can connect based on a bandwidth allocation algorithm, and can see ANY stream no matter which computer they get handed off to.

Is that possible?
Back to top
View user's profile Send private message
Admin
Site Admin


Joined: 04 Aug 2006
Posts: 488

PostPosted: Wed Feb 21, 2007 4:43 pm    Post subject: Reply with quote

I am not sure I understand you 100%, but I will try to answer:

Suppose you have a web-based apllication.
The client side displays the ActiveX control which plays live feed.

You have Web Server and Media Server running on computer S1.
You have 3 Live Servers (S2, S3, S4) having identical choice of live feeds.

What can you do to load balance bandwidth between S1 and S2/S3/S4?

You can do a lot and acheive perfect balance; but first of all you need to understand that there is only one stream per live source flowing between Media Server and Live Server, independently of number of active viewers.
For example, if you have 10 unicast viewers of live source L1 set up on computer S2, then there is only one stream between Media Server S1 and Live Server S2. Of course, S1 sends 10 unicast streams to these 10 viewers.

OK, now let's suppose you have 3 identical live sources L1, L2, L3 set up on each one of Live computers S2, S3, S4.
You can create 9 live broadcasts with Media Server config.
Our SDK component AutoServerConfig has a method that returns all existing Live Server connections.
On the server side of your web app you call this method and return web page that uses appropriate Alias according to your current bandwidth situation.

Example - let's say first user connects and asks for L1.
You call the method, no Live Connections exist yet (or they are idle) - you decide to return Alias S2L1 ( client side scripting UseLiveAlias(S2L1) )
Now second user connects and asks for L2. You call the method, notice that there is already streaming connection to S2, so you return Alias S3L2.
As a result, you have L1 deliverd from S2 and L2 delivered from S3.

I hope this helps.
Admin
Back to top
View user's profile Send private message Send e-mail
bostunes



Joined: 20 Feb 2007
Posts: 17

PostPosted: Thu Feb 22, 2007 6:30 am    Post subject: Reply with quote

Actually, I was thinking more along the lines of duplicating your S1 Media server into S1a, S1b, and S1c.

There are many different live feeds, and only one live server per feed (at or near the video source.) So the picture looks like so:

vid src --(1)-->live server (x1) --- x1--->??--> media server (x3) ---(many)-->

duplicated for many video sources and live servers.

Do I understand this correctly?

What I want to have happen is that where the question marks are, to somehow have ALL the live server feeds available on ANY media server, so that when a viewer connects to the media server, they could get connected to ANY server, but still see the feed they want.
Back to top
View user's profile Send private message
Admin
Site Admin


Joined: 04 Aug 2006
Posts: 488

PostPosted: Thu Feb 22, 2007 4:13 pm    Post subject: Reply with quote

I think I kind of answered that in my first answer.

You want to have many Media Servers. OK, why not.
Many Media Servers can connect to the same Live Server at the same time - that's the key to your question.

So suppose you have 3 Media Servers S1, S2 and S3.
and you have 3 Live Servers L1 L2 and L3.

On each one of S1, S2 and S3 you create 3 Static Live Broadcasts.

Now, on the server side of your web app, you return either S1, S2, or S3 address based on your own preference and the client side scripting on the user computer will call UseMediaServer(Sx), thus connecting to whatever Media Server you have chosen.

Admin
Back to top
View user's profile Send private message Send e-mail
bostunes



Joined: 20 Feb 2007
Posts: 17

PostPosted: Thu Feb 22, 2007 6:12 pm    Post subject: Reply with quote

Admin wrote:
I think I kind of answered that in my first answer.

You want to have many Media Servers. OK, why not.
Many Media Servers can connect to the same Live Server at the same time - that's the key to your question.

...

Admin


Yes, you sort of answered it, but what I wasn't sure of was your second statement above, which should make possible what I want to do.

Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Unreal Media Server Forum Index -> Streaming Files All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.6 © 2001, 2002 phpBB Group