3

I need to build infrastructure for video streaming service, that will be able to handle >100 live streams with average of 50 viewers, where top stream can have up to 5000 viewers. All streams will be served as multicast, not extra transcoding will be required (input and output will be h.264), no recording will be made. I'm curious how many streams can handle simple, non-proffessional server (customer be hosted in OVH) - let's say on quad core server with 32gigs of RAM??

P.S. I've tried to asked wowza, but their answer does not satisfy me (marketing stuff, nothing really useful).

1 Answers1

6

in general the max users depend on the max hardware available. The question is also if you are using RTMP or RTMPT (over HTTP Tunneling). HTTP Tunneling seems to be a bit more ressource hungry. Red5 and Wowza both use Apache Mina internally so differences might be not so big.

We made some load testing with Red5 with around 150 and 250 people in a single conference room. There have been no issues, however the needed memory will grow constantly with each new 100 streams that will be needed to handle.

You should make sure that the server is configured in that way that the max number of open files is large enough. You might find more info about the possible effects if too small here: http://blog.thecodingmachine.com/content/solving-too-many-open-files-exception-red5-or-any-other-application

Red5 delivers also some kind of clustering build in. I don't know the current status of it, however I think you can also easily build a cluster with several nodes if you simply manage the redirect to the nodes available correctly. You just need to make sure that people that would like to connect to the same stream should be visiting the same server node.

seba.wagner
  • 3,800
  • 4
  • 28
  • 52
  • Thanks for your answers. It indeed answers part of my question, but does not answer the main part. According to your experience - having 2x quad core intel + 32gb of ram will I be able to host ~25 multicast streams? (it's not going to be conference rooms, but live streaming - communication will only go in one direction). – Maciej Litwiniuk Aug 27 '12 at 10:07
  • In concrete we did run out 150 test on a 4 GB machine and the 250 test was on a 8GB machine. Both had enough space left over to even handle double, 3 or 4 times more. – seba.wagner Aug 27 '12 at 13:13
  • The key bottle neck is of course also bandwidth, live streaming with Flash is extremely bandwidth intensive as the number of streams doubles everytime there is a new presenter, viewers only count single our formular for the number of streams per conference room is: n * (n-1) = number of streams * bandwidth cost per stream = totel bandwidth – seba.wagner Aug 27 '12 at 13:14
  • I know, that bandwidth is bottleneck here, but that's not the case here :) @seba.wagner - you meant 150 multicast streams or 150 users in conference room? – Maciej Litwiniuk Aug 27 '12 at 14:10
  • I meant 150 users in a room, two presenter streams. The formula: n * (n-1) is actually true if all participants of a meeting have audio/video turned on. In our case we only had 2 streams and 150 viewers. So 300 streams total in a single room. – seba.wagner Aug 27 '12 at 14:17
  • Ok, but your formula applies only to bandwidth, not cpu / ram usage. And as long, as (for now) I don't have to care about it (I know costs of it), I still have no idea what will be hardware cost. – Maciej Litwiniuk Aug 27 '12 at 17:44
  • 1
    You might calculate 1000 concurrent user sessions per server unit. While each server unit has 4GB RAM and 2-3 GHz CPU. – seba.wagner Aug 28 '12 at 12:06
  • So last question. CPU - you're thinking about single core 3GHz? If so, I know of course, that having 2xquad core CPU I will not be able to handle 8000 users, but maybe around 3k, which seems to be ok in terms of costs. – Maciej Litwiniuk Aug 28 '12 at 12:14
  • I would not start my calculation based on that. I would rather recommend starting with a single smaller CPU and configure/implement that service in that way that you can add a second instance if required to your "server farm". I did not calc based on "single" or "double" core. I simply meant a CPU power of 2-3 GHz, no matter if its single, double or quad core. – seba.wagner Aug 31 '12 at 11:07
  • I need to use more than 20 conference rooms , each consists with 20 users who are streaming his/her video to others. Can this is done by using red5. – Gayan Charith Oct 23 '14 at 04:37