EC2 Instances: Purpose of CloudFront?

I apologize in advance if this is a simple question, but I can’t seem to find a straight answer.

This is for live event only streaming and I’ve already been able to successfully set up and test both the Wowza Media Server on an EC2 Instance both with and without using CloudFront for distribution. We’re encoding using Teradek Cube at 2.5-3.5Mbps, transcoding a cascade of lower bitrates using the Wowza Transcoder AddOn (transrate actually), and providing an adaptive bitrate HLS stream to JW Player, which users will view on our website via Flash or HTML5.

But now trying to get prepared for many simultaneous users for the actual live events and I don’t have the answers OR know how to simulate lots of users for testing. Does the use of CloudFront allow more users (in terms of throughput measured in Mbps and/or connections) to an HTTP feed or just faster access time for the same number of users per Wowza instance? I guess my question is, are we going to need multiple Wowza Media Server instances if we are using CloudFront if we are expecting, let’s just say 1,000 simultaneous users ranging from connections of 2.5Mbps to 400kbps? If you’re needing an exact figure, let’s just say 2,500 Mbps throughput (probably lower but this will be a safe estimate).

If the answer is YES on needing multiple instances, would anyone mind posting how to set up Elastic Load Balancer (or whatever is needed) on EC2 to ingest a single input source but balance over enough instances to allow the target audience to connect with a low latency, smooth video experience? I have been able to find out how to set all of this up on a single Wowza instance (used Hi-CPU XLarge for testing-c1.xlarge), but am not adept enough to provision multiple servers for optimization purposes.

Thanks in advance for any potential guidance. If I’m missing any needed information, please let me know and I’ll reply ASAP.

Also noticing that with CloudFront distribution, the .smil manifest files no longer are recognized, or at least don’t seem to be working. With just the EC2 Wowza Server and JW Player, the following worked with dynamic switching enabled:

http://[wowza-origin-address]/live/smil:myStream.smil/manifest.m3u8

Now, in order to play the stream (without the dynamic switching), only this will work:

http://[cloudfront-address]/live/myStream/manifest.m3u8

Is this a function of CloudFront at the edge locations not being able to use .smil file? Or am I missing something/doing something wrong?

Right, Wowza as an origin is not aware of playback clients that are streaming from the Cloudfront cache.

Richard

In JW Player, it would only work when it is using the .m3u8 url for playback, but not RTMP playback using Cloudfront. Only the HTTP stream types are supported.

You can use a OSMF2 player to playback HDS stream in Flash. Test with the Flash HTTP Wowza example player. Or use this OSMF2 configurator.

The .smil file in the Wowza origin /content folder is propagated to the CF edges.

Richard

OSMF configurator

It allows for more users in terms of throughput. It may also benefit access time in some cases, overall, though there would be many factors.

Richard

Hi. I would also like a better understanding of this AWS CloudFront question regarding live streaming. Does each CF edge server cache a copy of each live video segment OR does it cache a copy of each video segment PER USER because of the session ID in the url? In the first case cloud front acts as a wowza edge service or application layer multicast service and the origin server will get 41 connections at most (one from each CF edge server). In the second case the edge servers will make a new request for the same content for each user. The origin server will service every single request without the benefit of origin edge load distribution.

I found the answer to my question here:

https://www.wowza.com/docs/how-to-integrate-your-wowza-ec2-instance-with-cloudfront#about

so it seems the origin will only see one connection from each CF edge server. But wowza session info is lost.

tirapell asked some interesting questions three months ago, anyone care to address them?

Does the use of CloudFront allow more users (in terms of throughput measured in Mbps and/or connections) to an HTTP feed or just faster access time for the same number of users per Wowza instance?