Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I had a client a few years ago who was using another service for image hosting, and they were getting charged through the nose for it. This is before cloudflare had their own image CDN style service. The client's app made heavy use of URL based image transforms. And we didn't want to lose that - so it seemed like they were a little stuck.

The website itself was already using cloudflare's CDN. So I added a simple cloudflare URL rule to redirect all requests hitting /images/XXX to the 3rd party image hosting service. Within a month our client's image hosting bill dropped from $~10k/month down to about $90/month, which I felt great about.

I did made one terrible mistake though - I forgot to tell our client about the configuration change. So cue a monday morning panicked phone call from our client when they got their bill, asking what on earth was happening that caused all their web traffic to disappear overnight. They thought (based on the bill) that their website must be broken and they were freaking out about it! Oops!




Your post leaves it a little bit unclear what you actually did.

Are you saying that

1. Originally all requests for images went directly to the egregiously-priced image host

2. You changed that traffic to be routed through Cloudflare instead so it would be cached

3. That reduced requests to your image host enough to cut your bill by 99%

?


The client was using an image host which supported image transforms. They uploaded all their images there and were using a lot of image transforms from that host on their website. So, HOST/img/123?scale=1.3&color=greyscale type business. They were paying per image loaded from the site.

We tucked cloudflare in front of the image host using a URL rewrite rule. Cloudflare's cache reduced the number of requests made to the image host by 99% or something.


Thanks for confirming! Pretty amazing what some well-placed caching can do.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: