You are reading a single comment by @danb and its replies. Click here to read the full conversation.
  • Hmm.

    Good point... let me go and check the cost of hosting images at the moment.

    Maybe I should just up the file size? Super simple to do... just a question of cost.

  • You use s3 don't you? Don't forget the data transfer costs will go up with bigger files...

  • You use s3 don't you? Don't forget the data transfer costs will go up with bigger files...

    We don't have a bandwidth charge from S3.

    What I do instead:

    1. Proxy S3 behind our app (long term durable storage)
    2. Rename all files to their SHA1 hash
    3. Serve all files from /api/files
    4. Put an nginx file cache in front of /api/files (long term slow cache)
    5. Put Cloudflare in front of nginx (short term fast cache)
    6. Configure a Cloudflare Page Rule to cache everything

    The only bandwidth we ever incur is the very first GET of a file after it's uploaded.

    I really focused on this when our S3 cost became our biggest cost.

    Now our Linode costs are our biggest costs (at just over £310 per month).

    So it's just storage really... and that isn't so bad.

About

Avatar for danb @danb started