AWS Cloudfront Bill for Cache是​​否命中?

发布于 2025-01-28 13:37:07 字数 591 浏览 1 评论 0原文

我知道AWS CloudFront Bills数据传输(并且免费层中有1 TB)。但是我想知道哪些云将什么算作数据传输。是否将任何数据传输到Internet(CloudFront Cached Data aka Cache命中,从EC2/S3传输的数据)?

例如,,假设Origin Server(EC2)将1 GB的数据返回到Internet,CloudFront缓存了它,最终请求的数据被请求&转移了4次到互联网。会向我向我收取5 GB的数据传输或仅用于1 GB(以及其他4 GB,因为它是缓存的)

仅用于上下文:我有一个返回图像的EC2应用程序(存储在S3中),现在我收到了越来越多的请求,因此数据传输EC2的成本越来越多。我一直在寻找缓存图像的选项,以降低数据传输成本。我发现的两个选项是 Cloudflare & CloudFront 。 CloudFlare似乎是一个不错的选择,并且可以实现缓存,但是与此同时,我正在尝试弄清楚云方面的工作原理(因为我正在使用AWS生态系统)。

如果该云层向每个数据传输(即使是缓存)收费,那么我想它不会降低数据传输成本。

I know that AWS CloudFront bills Data Transfer Out (and there's 1 TB of free in the free tier). But I was wondering what CloudFront counts as Data Transfer. Is any data transferred to the Internet (CloudFront cached data aka cache hit, data that is transferred from EC2/S3) billed?

For instance, let's say the origin server (EC2) returned 1 Gb of data to the Internet and CloudFront cached it, and eventually cached data got requested & transferred 4 times to the Internet. Will AWS bill me for 5 Gb of Data Transfer Out or only for 1 Gb (and the other 4 Gb won't be billed since it's cached)

Just for context: I have an EC2 application that returns images (that are stored in S3) and now I'm getting more and more requests and therefore more and more costs for the Data Transfer Out of EC2. I was looking for the option to cache images for some time in order to reduce Data Transfer costs. Two options that I found are Cloudflare & CloudFront. Cloudflare seems like a good option and allows to implement caching but in the meantime, I am trying to figure out how CloudFront works (since I'm using AWS ecosystem).

If that CloudFront bills every data transfer (even that is cached) then I suppose it won't reduce the Data Transfer cost.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

汐鸠 2025-02-04 13:37:07

这就是文档所说的。

Origin Server到Amazon Cloudfront(Origin Fetches)

如果您使用的是AWS服务作为内容的来源,则从Origin到Edge位置传输的数据(Amazon Cloudfront Origin Fetches)是免费的。这适用于从所有AWS区域到所有全局云边缘边缘位置的数据传输。数据从AWS服务的数据传输到所有非原始获取流量(例如Multi-CDN流量)到CloudFront 将招致其各自的区域数据传输收费

AWS Cloud Services和Amazon Cloudfront for Origin Fetes 之间的免费数据传输

如果使用了诸如Amazon S3,Amazon EC2或弹性负载平衡之类的AWS起源,则从Origins到CloudFront Edge位置传输的数据没有收费(此类数据传输称为Origin Fetch)。

此处有关CloudFront价格的详细信息以及价格计算器

Here's what the docs say.

On Origin server to Amazon CloudFront (origin fetches)

If you are using an AWS service as the origin for your content, data transferred from origin to edge locations (Amazon CloudFront origin fetches) are free of charge. This applies to data transfer from all AWS regions to all global CloudFront edge locations. Data transfer out from AWS services for all non-origin fetch traffic (such as multi-CDN traffic) to CloudFront will incur their respective regional data transfer out charges.

Free data Transfer between AWS cloud services and Amazon CloudFront for origin fetches

If AWS origins such as Amazon S3, Amazon EC2 or Elastic Load Balancing are used, there is no charge incurred for data transferred from origins to CloudFront Edge locations (this type of data transfer is known as origin fetch).

Here's detailed information on CloudFront Pricing along with a Price Calculator.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文