从 Amazon S3 提供静态文件

发布于 2024-10-10 07:25:52 字数 72 浏览 0 评论 0原文

对于提供大多数网站的静态文件(javascript、css、图像、html)来说,什么更好:S3、EC2 之类的东西还是其他选择?

What is better for serving static files of most websites (javascripts, css, images, html): S3, something like EC2 or yet another option?

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

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

发布评论

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

评论(2

毁虫ゝ 2024-10-17 07:25:52

我选择启用 CloudFront 的 S3;那么您将获得 S3 的优势,并且用户可以通过其边缘位置进行快速访问。

如果您有一些非常高的性能要求,您应该考虑物理上位于用户附近的东西。就我而言,瑞典提供商比亚马逊的任何解决方案都要快一些(但通常不太好用)。

EC2 并不是真正为静态文件而设计的(或者更确切地说,它是为更多用途而设计的)。

S3 with CloudFront enabled would be my choice; then you get the benefits from S3, plus fast access for your users through their edge-locations.

If you have some really high performance demands, you should look into something that is physically located near your users. In my case, swedish providers are a bit faster than any of Amazons solutions (but usually not as nice to use).

EC2 is not really made for static files (or rather, it's made for so much more).

压抑⊿情绪 2024-10-17 07:25:52

既然 Amazon S3 可以为您做这件事,而且管理起来更容易,为什么还要麻烦 EC2呢?只需使用 BucketExplorer 之类的工具进行上传/下载,您无需担心启动图像、确保它们仍在运行、保持软件版本最新、为空闲时间付费等。

另请参阅 Amazon 的 CloudFront 服务,这是 Amazon S3 的 CDN。它对您来说可能经济,也可能不经济,但它可以极大地缩短用户的下载时间。

Why go to the trouble of EC2 when Amazon S3 will do this for you, and is a LOT easier manage? Just use something like BucketExplorer for upload/download, and you don't need to worry about starting images, making sure they're still running, keeping software versions unto date, paying for idle time, etc.

Also look at Amazon's CloudFront service, which is a CDN for Amazon S3. It may or not be economic for you, but it can greatly improve download times for your users.

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