WowzaMediaServer using Amazon EC2 Images

This stuff rocks.  WowzaMediaServerPro allows us to run a RTMP server (think Flash Media Server) on Amazon Elastic Compute Cloud (EC2).  Pay as you stream... excellent business model for any businesses as you're not sure how many people will be using it (save on marketing/surveys etc), and you get a high-quality platform from the start rather than worrying about your VPS or dedicated hosting and opening firewalls left and right.

Now, because its using EC2 and you can ballpark the server's capacity depending on your client's applications, WowzaMedia said their streaming server can handle about 2000 concurrent streams.  Because I want high quality streams 100% (or 99.99999%) of the time, I decided that 1000 is my threshold.  What happens if we hit 1000?  With Amazon EC2, that's a piece of cake.

I built a Windows Service in .NET/C# that monitors all of my clients' WowzaMediaServerPro EC2 instances.  The Windows Service monitors them by checking the stream counts using Wowza's special URL, and stores it in a SQL database.  When the Flash client application requests a stream, it'll check the database via a Web Service for the stream count, and if it is over 1000 (my threshold), that prompts the Windows Service to send a command to create a new instance of the WowzaMediaServerPro EC2 server.  As soon the new instance is created, the Amazon EC2 service returns the new rtmp URL back to the database.  Hence, any subsequent conferences will be using the new rtmp URL.

That rtmp URL is pretty much dynamically loaded every time since the Windows Service also provides load balancing capabilities (to keep the # of streams level across various servers until it goes down a certain point) and it automagically terminates any unused servers (or when streams equals to 0).  You can use it to terminate the oldest first so you always have a "fresher" server running.

This is the ultimate geek stuff!! :-)