2

We are hosting videos in AWS S3 in HLS format (lots of .ts files, + playlists .m3u8).

We have configured AWS CloudFront with all Edge locations to serve those files.

We have 2 apps, iOS and Android, with a video player that plays the CloudFront URL. Android app is using Google’s Exoplayer, and iOS app is using AVPlayer. They both present the same issues.

The videos play smoothly from the same region as the source S3 bucket. We had some issues at the start but we fixed them by fixing the bitrate encoding.

However customers from remote countries complained about the buffering: average of 1 minute to initially load the video, then average of 12s of buffering every minute.

So we decided to add AWS CloudFront so that the files would be cached in the Edge locations, making the videos faster to load.

But the customers kept complaining, and we were aware that it would still take a while to load for the first user.

So we set up 2 non-AWS servers in other regions that automatically download the videos, in the aim to get them cached in those 2 regions, as soon as they are published.

But it doesn’t seem to help either.

I am wondering if AWS CloudFront is effective at all for video streaming via direct download, or if we are missing something.

How to make CloudFront work to get rid of video buffering? 
Or if CloudFront is not the solution (why?), what should we be looking at?

Side note: We set the TTL to 10 years, just in case… and we manage invalidation manually.

13
  • What did AWS support say about this?
    – EEAA
    Jun 14, 2017 at 1:36
  • It didn't actually cross our mind to contact them for this... We looked and we looked on the Internet but couldn't find anyone with the same sort of issue. Will do now!
    – APE
    Jun 14, 2017 at 1:39
  • I'm frequently surprised by AWS support. It's not cheap, but they do a good job.
    – EEAA
    Jun 14, 2017 at 1:41
  • Right, we are on the basic plan so we don't have access to Technical Support. I will have to check if we can pay for that.
    – APE
    Jun 14, 2017 at 1:43
  • 1
    Yes. The CloudFront logs will be more interesting, but also, you should be able to cross-coordinate cache misses and refresh-hits to S3 requests. Take the client IP from the S3 logs, do reverse lookups on them, and the hostname should reveal the CloudFront edge that actually did the fetch from S3 (which should line up with the CloudFront edge codes in the CF logs, but discrepancies may also be informative). Jun 15, 2017 at 0:28

0

You must log in to answer this question.