cloudfront cache hits only pricing

浪尽此生 提交于 2019-12-23 05:14:23

问题


lets say i am using aws's s3 connected with cloudfront .

And s3 sends one image file of size 1 MB to be cached on all cloudfront's edge nodes.

then the cached image file is downloaded 1 million times from cloudfront's edges .(the image is not grabbed again from s3 ).

do i pay for

1-the bandwidth for transferring the file from s3 to cloudfront edges.

2- the bandwidth for transferring the file from s3 to cloudfront edges + the bandwidth for 1 million downloads from the cloudfront edges .

also , if the answer is 2 , then that means caching doesn't save money at all ? only impove performance ?

and if that's the case why use cloudfront instead of cloudflare since cloudflare provides free bandwidth ? (is there a catch there ?)


回答1:


You don't pay from S3 to Cloudfront:

If you are using an AWS origin, effective December 1, 2014, data transferred from origin to edge locations (Amazon CloudFront "origin fetches") will be free of charge.

You do pay outbound transfer. If we stay with the lowest-priced Cloudfront tier, you'll pay $85 for data plus 75 cents for the HTTP requests.

In comparison, using S3, ignoring the free transfer tier, you'll pay $90 for data plus 40 cents for HTTP requests.

So, why use Cloudfront? First, users will get significantly lower latency to download your 1mb file. Second, the price remains lower as you go up the bandwidth tiers- if you are shipping 300tb of data per month, the final tier is 20% cheaper than the S3 price.

There are certainly places that offer better bandwidth pricing than AWS, in server/file/cache variations. If you use Cloudflare you'll pay for S3 to Cloudflare. You may only need to pay it once (1mb), but in reality it'll be more than once.




回答2:


You need to decide if your goal is to maximize performance or maximize savings. Cloudflare may be cheaper, but according to this article:

http://goldfirestudios.com/blog/135/CDN-Benchmarks%3A-CloudFlare-vs-CloudFront

and others that I have read, Cloudfront beats cloudflare by a wide margin for performance.



来源:https://stackoverflow.com/questions/30243099/cloudfront-cache-hits-only-pricing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!