mooreniemi / Transbucket_Rails

:hospital: → :camera: → :thumbsup:
http://www.transbucket.com
10 stars 4 forks source link

cost reduction #88

Open mooreniemi opened 3 years ago

mooreniemi commented 3 years ago

References:

https://www.cloudzero.com/blog/reduce-data-transfer-costs https://www.apptio.com/blog/aws-data-transfer-costs/

mooreniemi commented 3 years ago

https://aws.amazon.com/blogs/networking-and-content-delivery/amazon-s3-amazon-cloudfront-a-match-made-in-the-cloud/ https://stackoverflow.com/questions/29756313/custom-url-with-paperclip-and-aws-s3 https://www.stormit.cloud/post/amazon-cloudfront-pricing-how-to-approach-it-and-save-money

mooreniemi commented 3 years ago

I think CF images are caching...

cached

mooreniemi commented 3 years ago

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html

mooreniemi commented 3 years ago

Hmm, CF looks to be way more expensive than S3, which I think is how it is listing out what I saw as data transfer before. I may want to move back off it.

tb_costs

mooreniemi commented 3 years ago

I need to check if we're using thumbnails for the overview view, I suspect not. That's likely a large cost driver given image sizes.

mooreniemi commented 3 years ago

Yeah, we were not using the :medium or :thumb. I switched to :medium for now. Some docs here: https://github.com/thoughtbot/paperclip/wiki/Thumbnail-Generation

mooreniemi commented 3 years ago

Slightly more traffic but now downloaded bytes only 40% of what it was... This should bring CF down in cost to where S3 was before, and I think is acceptable.

Top graph is bytes, bottom is requests.

cf-decrease