Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
kelvis2000
Level 7

Amazon Cloudfront TTL

Should the TTL be set to zero for videos that are to stream to Roku when using the S3-Cloudfront combination?
0 Kudos
4 Replies
rarebrds
Level 7

Re: Amazon Cloudfront TTL

Setting the TTL to zero will tell Cloudfront to not cache your items and get the latest from your server on every request. This sort of defeats the purpose of Cloudfront, so you should have a TTL set. How often do you videos change? Usually we cache them for 2 years and then if we create a new video we either invalidate the cache or create a new versioned folder with the new videos. You get 1000 invalidations per month, so if you're not worried about changing out more than 1000 videos a month, you can just invalidate.

Note: Invalidating can take 30 mins to an hour, so if you need immediate results, this option won't work for you.

Cheers!
0 Kudos
kelvis2000
Level 7

Re: Amazon Cloudfront TTL

Thanks RareBrds,
I just set up Amazon Cloudfront for the first time, trying to get acclimated.
Sorry to ask a dumb question but I have about 30 videos which will not change,
they all range between 100 and 250 megabytes and are 5 to 12 minutes long
most in .m4v format a few .mov. My channel is a Instructional Guitar channel.
What would you think the TTL should be set to,

Thanks for your help!
Kevin
0 Kudos
rarebrds
Level 7

Re: Amazon Cloudfront TTL

if you're not going to change out the files, then I would set it for at least a month. Cloudfront will respect your headers and won't go back to the origin to check for an update. If you're for certain the files will NEVER change, then I would set it to 2 years. This doesn't reduce the costs of your CloudFront or S3 buckets, it's just so that videos will always be located at the edge zones and be available to your customers faster.
0 Kudos
kelvis2000
Level 7

Re: Amazon Cloudfront TTL

Thanks very much for your response,
I might add a video every few weeks but not removing any of the videos
so the numbers of Videos will increase and I will not remove.
Would you think it a good idea to use expires field
like this,
Sat, 30 Jun 2012 23:59:59 GMT

I am looking for some tutorials on cache as it pertains to the cloud environment.

Will using the cache increase your monthly rate because you are using resources?

Again Thanks,
Kevin
0 Kudos