Hacker News new | ask | show | jobs
by codepodu 3217 days ago
We put it behind Fastly. We could have used Cloudflare too, but we were racing against time (and angry customers!). We set the cache timeout to 1 hour, and that's pretty much it.
1 comments

Nice! Why did you choose to implement it as a proxy instead of using it as a primary source and just fetch from S3 on-the-fly while caching the generated image? If capacity is the problem then making it HA should solve that issue?
That's actually what we did. From pilbox's docs: > It is not intended to be the primary source of images, but instead acts as a proxy which requests images and resizes them as desired.

We fetched from S3 on-the-fly while caching the generated image using a CDN we already had at hand. This is a band-aid for the night (we're in India, it's 2 AM here) and not for handling daytime traffic. We're obviously hoping imgix will fix their issues in the next several hours. Even if not, at least our customers get a degraded experience than a broken one.