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?
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.
Are you using CloudFront for S3? I don't think your content will be cached if you do not specify a cache endpoint.
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.
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.