caching - 云端缓存仅命中定价

标签 caching amazon-web-services amazon-cloudfront cloudflare

假设我正在使用与 cloudfront 连接的 aws s3。

s3 发送一个大小为 1 MB 的图像文件缓存在所有云端的边缘节点上。

然后缓存的图像文件从云端边缘下载了 100 万次。(图像不再从 s3 抓取)。

我付钱吗

1-将文件从 s3 传输到云端边缘的带宽。

2- 将文件从 s3 传输到云端边缘的带宽 + 从云端边缘下载 100 万次的带宽。

另外,如果答案是 2,那么这是否意味着缓 stub 本不省钱?只提高性能?

如果是这种情况,为什么要使用 cloudfront 而不是 cloudflare,因为 cloudflare 提供免费带宽? (那里有陷阱吗?)

最佳答案

您无需从 S3 向 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.

您支付出境转账。如果我们继续使用价格最低的 Cloudfront 层,您将支付 85 美元的数据费用和 75 美分的 HTTP 请求费用。

相比之下,如果使用 S3,忽略免费传输层,您将支付 90 美元的数据费用和 40 美分的 HTTP 请求费用。

那么,为什么要使用 Cloudfront?首先,用户下载 1mb 文件的延迟将大大降低。其次,随着带宽层的增加,价格会保持较低水平——如果您每月传输 300tb 的数据,最后一层比 S3 价格便宜 20%。

在服务器/文件/缓存变体方面,肯定有一些地方提供比 AWS 更好的带宽定价。如果您使用 Cloudflare,您需要为 Cloudflare 支付 S3 费用。您可能只需要支付一次 (1mb),但实际上会不止一次。

关于caching - 云端缓存仅命中定价,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30243099/

相关文章:

python - Django 自定义静态文件未收集到 s3 存储桶

php - 清除 tinymce 编辑器中的缓存

json - AWS Lambda http请求: Unable to stringify body as json: Converting circular structure to JSON

django - 在保存到缓存之前先压缩Python对象

amazon-web-services - 获取 AWS Lambda 中冷启动的概述

amazon-web-services - 如何使用 cli 更新 cloudfront 发行版中的 lambda@edge arn

duplicates - Cloudfront 自定义源导致重复内容问题

ruby-on-rails - 使用 AWS Cloudfront 异步加载 Google map

php - Symfony 清除缓存后的所有空白页

html - 使用内容版本策略时在 Spring 中缓存破坏 @import css