Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
OtherWorldsTV
Reel Rookie

CDN not caching properly?

Hi all, I have a slight issue with my setup, and am in need of advice.

Basically, all my video files are hosted on an S3 instance, which pass through a CDN before going on to the channel viewers.

In theory, the CDN should grab the file from the S3 instance one time, and serve it up to all the viewers requesting it, correct? So if on Monday I have 100 viewers watching War of the Monsters (1966), the CDN should just request that file from S3 once, and serve it to the 100 viewers.

In practice, my CDN is requesting the file from S3 100 times, once for each viewer. It isn't actually caching at all.

I've been talking with the CDN's tech support and they claim "everything is working fine," but the logs (and bills) from Amazon say differently.

So am I wrong here, or is my CDN costing me more money for zero benefit?

0 Kudos
4 REPLIES 4
OddScott
Roku Guru

Re: CDN not caching properly?

I ran into a similar issue with Leaseweb a couple of months ago, after a correctly working account was "migrated" to a new account. There were 2 different settings in the Leaseweb CDN that caused an inordinate amount of transfers out of the S3 origin into the CDN cache. One was a TTL (time to live) policy option to "Honor Origin TTL" - this needed to be disabled. The other setting was the TTL that is used when not using the origin TTL, the default value of which was 86400 (1 day) - this needed to be changed  to 2592000 (30 days). After doing this the cache hits increased from under 70% to about 99% and the S3 traffic decreased back to a minimal level.

www.InstantTvChannel.com / www.InstantSubtitles.com - 717-441-4386 - Build a Roku SDK channel in 15 minutes! Easily and inexpensively generate subtitles!
Baradanikto
Roku Guru

Re: CDN not caching properly?

Are you using CloudFront for S3?  I don't think your content will be cached if you do not specify a cache endpoint.

FREE Windows desktop software for converting Direct Publisher channels to SceneGraph (SDK), for creating BIF (Trick Play) files, Roku (MRSS, JSON) feed files, and FireTV feed files @ GitHub/rrirower.
0 Kudos
OtherWorldsTV
Reel Rookie

Re: CDN not caching properly?

That's what we think is going on here. It worked fine with 93% cache hits up util about a month ago when they had some "emergency maintenance" and since then it's been 0% cache across the board.

One of their techs finally replied this morning asking me to add an explicit header to our S3 links with a "Expiry:max-age=15811200" metadata. I'm doubtful, but trying it before moving to a new CDN.

0 Kudos
OtherWorldsTV
Reel Rookie

Re: CDN not caching properly?

No, direct file transfer from S3 to the CDN. We could use CloudFront, but that would be close to $400/month extra. It worked fine until about a month ago when the CDN had "emergency maintenance." Since then, 0% cache hit.

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.