3 ms·
This very much. You can also save all your media with content hashes in their filename, then tell cloudflare to "always permanently cache" everything behind a c
by scrollaway 9y ago
This very much. You can also save all your media with content hashes in their filename, then tell cloudflare to "always permanently cache" everything behind a certain path using a page rule.
I have a site set up like that which serves over 1TB monthly and <5GB of it actually goes through to S3. (And obviously you don't have to use s3 to back it, you can use anything)
Bonus points: If you do it this way you can also use immutable caching for clientside savings. More info: https://hacks.mozilla.org/2017/01/using-immutable-caching-to-speed-up-the-web/ https://hacks.mozilla.org/2017/01/using-immutable-caching-to...
This may be dependent on how large your media is however. 5TB sounds like it could be large videos, so some of this may not apply to you. I don't know how well Cloudflare caches videos.
- SXX 9y agoAny evidence that Cloudflare will cache even fraction of his 5TB on free plan? While I personally have sites where like 20GB of images were cached on free tier I truly don't expect them to cache as much as even 1TB. > I don't know how well Cloudflare caches videos. It's cache files only under 512MB: https://support.cloudflare.com/hc/en-us/articles/200394750-What-s-the-maximum-file-size-CloudFlare-will-cache- https://support.cloudflare.com/hc/en-us/articles/200394750-W...
- harlanji 9y agoCF does a good job caching, if you do a good job segmenting. Here's a screen cast I did a while back exploring HLS: https://www.youtube.com/watch?v=v9TJuWT5sNM&t=6m27s https://www.youtube.com/watch?v=v9TJuWT5sNM&t=6m27s
- vidyesh 9y agoDoes Cloudflare cache everything no matter how much you feed it? You said <5GB goes through to S3 so that is from the total 1TB of data?