I am trying to quickly learn some of the underlying technology behind HDS and HLS live streaming.
I have set up Wowza Media server 3.5 on a Amazon WebServices instance in EC2 and distribute through CloudFront. I did my first live event and was watching my server load creep higher and higher. I was wondering if anyone could help me understand some of the underpinnings of HDS/HLS live streaming (and nDVR...):
Here's where my question comes about: how data is served for video content (here's my understanding, please set me straight!): - When a viewer requests a playlist or mainfest file, they get XML back which points the player to a chunk of video/audio (m4fa and m4fv within the DVR application instance?) data that they need to play next. Since this data is also delivered over port 80, it is cached as well.
If the above statements are correct, then does the following make sense for optimization for HDS and HLS:
Case 1: DVR service: I set the rules for caching in CloudFront as follows:
Case 2: No DVR service (is this the better way to optimize?)
Thanks for any insight you can offer!
Is there a way to configure a different sitename for the media? For DVR sessions, you want the m3u8 files to be served directly from your server (no CF, or 2 second CF), but the media files to be served though CloudFront with a really long expire time.
(For non-DVR sessions, it could all go thru CloudFront, since it's cachable.)
The usefulness of CloudFront really depends on how many popular (and unpopular) streams you have.
For example, let's say there are 20 CloudFront boxes in a particular POP. If 5 people view a stream, each one is likely to hit a different CF box, get a cache miss and need to hit your server anyway. You'd have to have 50 or 70 people viewing a stream from that POP before CloudFront stops hitting your server and serves everything from the cache. Because there are many POPs, you could have 100 people viewing a stream all over the world, but each hitting a different box in a different POP, and your server still gets 100 requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With