Re:Koyeb Serverless Engine: Docker Containers, Continuous De...
by kdeldycke on Thursday November 12, 2020 @10:34AM
(#25070931)
This might come handy to resize all the images for my static website, which was hammered by HN this week as it reached the front page. This lack of optimisation increased my AWS invoice 3 times (because of CloudFront outgoing bandwidth).
[ Parent
| on HN ]
Re:Koyeb Serverless Engine: Docker Containers, Continuous De...
by jb0x168 on Thursday November 12, 2020 @03:56PM
(#25074893)
Cache your images longer at cloudflare's edge:
New Page Rule -> your.site/*.png (or jpg, gif, etc)
Cache Level: Everything
Edge Cache TTL: (some large value, an hour maybe)
This will make sure you don't serve any given image more than once per hour, and the rest of the requests will get served CF's edge cache.