何时使用 Amazon Cloudfront 或 S3 [英] When to use Amazon Cloudfront or S3

查看:33
本文介绍了何时使用 Amazon Cloudfront 或 S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有比 s3 或其他方式更适合 Amazon cloudfront 的用例?我试图通过示例了解两者之间的区别.

Are there use cases that lend themselves better to Amazon cloudfront over s3 or the other way around? I'm trying to understand the difference between the 2 through examples.

推荐答案

Amazon S3 专为特定地理区域的大容量、低成本文件存储而设计.* 存储和带宽成本相当低.

Amazon S3 is designed for large-capacity, low-cost file storage in one specific geographical region.* The storage and bandwidth costs are quite low.

Amazon CloudFront 是一个内容交付网络 (CDN),它在尽可能靠近用户的边缘位置代理和缓存 Web 数据.

Amazon CloudFront is a Content Delivery Network (CDN) which proxies and caches web data at edge locations as close to users as possible.

当最终用户使用此域名请求对象时,他们会被自动路由到最近的边缘站点,以高性能交付您的内容.(亚马逊)

When end users request an object using this domain name, they are automatically routed to the nearest edge location for high performance delivery of your content. (Amazon)

CloudFront 提供的数据可能来自也可能不来自 S3.由于对传输速度进行了更优化,因此带宽成本稍高.

The data served by CloudFront may or may not come from S3. Since it is more optimized for delivery speed, the bandwidth costs a little more.

如果您的用户群本地化,则使用 S3 或 CloudFront 不会有太大差异(但您必须为 S3 存储桶选择正确的位置:美国、欧盟、亚太地区).如果您的用户群全球并且速度很重要,CloudFront 可能是更好的选择.

If your user base is localized, you won't see too much difference working with S3 or CloudFront (but you have to choose the right location for your S3 bucket: US, EU, APAC). If your user base is spread globally and speed is important, CloudFront may be a better option.

S3 和 CloudFront 都允许域别名,但是 CloudFront 允许多个别名,以便 d1.mystatics.comd2.mystatics.comd3.mystatics.com 都可以指向同一个位置以增加并行下载的容量(这曾经被 Google 但随着 SPDY 和 HTTP/2 的引入变得不那么重要了).

Both S3 and CloudFront allow domain aliases, however CloudFront allows multiple aliases so that d1.mystatics.com, d2.mystatics.com and d3.mystatics.com could all point to the same location increasing the capacity for parallel downloads (this used to be recommended by Google but with the introduction of SPDY and HTTP/2 is of lesser importance).

CloudFront 自 2014 年起也支持 CORS(感谢 sergiopantoja).

CloudFront also supports CORS as of 2014 (thanks sergiopantoja).

* 注意:从 2015 年起,S3 现在可以自动复制到其他区域.

这篇关于何时使用 Amazon Cloudfront 或 S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆