Wednesday, April 23, 2008

10 Quick Reasons Of Why To Choose Red5 Media Server Over Flash Media Server

Red5 media server
Why to choose Red5, an open source flash media server over Adobe Flash Media server. Few weeks back, Red5 has released version 0.7.0 final which has many new features and bug fixes. The complete changelog is here.

Red5 vs. FMS

Here is a quick list of why to choose Red5 over FMS.

1. Red5 can stream as well as Flash Media Server.

2. No delay in Audio/Video broadcast with latest versions.

3. The server side is Java, much more popular than Adobe server side action scripting for flash media server.

4. Strong community support for Red5 as you can see in Red5 showcase, some of the big companies are also working on Red5 based application.

5. Red5 is not just a streaming server, its much more powerful, You can build many useful applications( whiteboard, Chat, Poll, Desktop Sharing, ...) over Red5, which does things more than just streaming.

6. Red5 uses MRTMP now to cluster the stream data with Terracotta, now you can do a load balancing with red5.

7. Red5 team is working to release the version of Red5 which will support H.264.

8. There are good Red5 support and hosting companies now available which can provide support and can host your Red5 based applications.

9. Red5 is an open source project (http://osflash.org/red5), so you can contribute to its development.

10. Red5 is fun, Red5 is free.

So if someone is in dilemma of selection between Red5 and FMS, share this information with him. You are welcome to put comments or suggest some more points to add to this list.

Reference:-
Red5 Official Webpage

Saturday, April 5, 2008

Red5 And Load Balancing - Not The Load Balancer Way

In one of my previous post, I discussed about the load balancing of stream data using Terracotta. There are many red5 users who do not want this solution because this soulution is too advance for them. They dont have such a huge load on their server that they need this soultion.
For those who just want to keep distributing the incoming requests to any of the available server they have, Lets call it static load balancing, because we know to which server we have to map the request.
We will not use any kind of load balancer like Pound or something else.

Below is simple way to acheive the load balancing of Red5 without using any load balancer.

Round-Robin:-
Suppose we have 4 Red5 servers and we want to distribute the incoming client request to one of these server in Round-robin fashion. So the possible table could be like below-


Request Red5-1 Red5-2 Red5-3 Red5-4
1 Yes No No No
2 No Yes No No
3 No No Yes No
4 No No No Yes
------------------------------------
5 Yes No No No
-----------------------------------


As you can see the fifth request will again map to first red5 server and so on.

This was the simplest solution to distribute the load on Red5 server but it has some limitations.
This approach does not know which server is loaded much or exhausted. it simply passes the incoming request to any of the server based on round-robin.

The other efficient way to load balance red5 could be-

1. Add in your application a function that returns the amount of
rooms/instances/scopes and connected users.
2a. Develop a (php-)script that calls that function on your red5 server(s)
using AMFPHP via cron(job) once every xx minutes.
2b. Calculate the result (e.g. server A has 70 users and server B has 120
users) and store it in a small status-file (or db).
3a. Have your flash-client-application call the (php-)script
3b The script reads the status-file or db.
3c The script returns 'go connect to server A.
4 The flash client connects to server A , thus offloading server B.

The second solution is taken from the discussion in Red5 forum over load balancer.

See Also:-

Red5 clustering of stream data with Terracotta
MRTMP- Red5 load balancing

Technology makes life easier

Daily Technology Tips

Open Source Flash Jobs

Adobe Flex Developer Center: Recent tutorials

Programming Discussion Forum