我要坚持在EBS或S3图像? [英] Should I persist images on EBS or S3?

查看:187
本文介绍了我要坚持在EBS或S3图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我迁移我的Java,Tomcat的,MySQL服务器到AWS EC2。

I am migrating my Java,Tomcat, Mysql server to AWS EC2.

我已经附加EBS卷来存储MySQL数据。在我的Web应用程序的人可以上传图片。所以我要坚持他们。有在我的脑海2的替代品:

I have already attached EBS volume for storing MySql data. In my web application people may upload images. So I should persist them. There are 2 alternatives in my mind:

  1. 在保存上传的图片到EBS卷。
  2. 使用S3服务。

下面是我的笔记,请怀疑论者他们,因为我的专业是不是在服务器上,但软件开发。

The followings are my notes, please be skeptic about them, as my expertise is not on servers, but software development.

  • EBS加:S3存储是更昂贵。 ($ 0.15 / GB> 0.1 $ / GB)

  • EBS plus: S3 storage is more expensive. (0.15 $/Gb > 0.1$/Gb)

S3加:从EBS服务可以静态负面影响我的Web服务器的性能。这是真的?有没有服务的图像尤其是影响服务器性能?对于S3我的服务器将不负责提供静态。

S3 plus: Serving statics from EBS may influence my web server's performance negatively. Is this true? Does Serving images affect server performance notably? For S3 my server will not be responsible for serving statics.

S3加:从EBS服务静可能会导致I / O成本,因为这可能是次要的

S3 plus: Serving statics from EBS may result I/O cost, probably it will be minor.

EBS加:人们都说EBS更快

EBS plus: People say EBS is faster.

S3加:人们说S3是更安全的持久性。

S3 plus: People say S3 is more safe for persistence.

EBS加:不需要学习的API,它是直线前进的图像保存到EBS卷

EBS plus: No need to learn API, it is straight forward to save the images to EBS volume.

也就是说我不能决定,会很高兴,如果你指导。

Namely I can not decide, will be happy if you guide.

感谢

推荐答案

我目前使用S3的一个项目,它的工作非常好。

I'm currently using S3 for a project and it's working extremely well.

EBS意味着你需要管理一个音量+机将其附加到。您需要添加的空间,因为它是填补和执行备份(不是说你不应该备份您的S3数据,只是它不是那么严重)。

EBS means you need to manage a volume + machines to attach it to. You need to add space as it's filling up and perform backups (not saying you shouldn't back up your S3 data, just that it's not as critical).

这也使得它更难规模:当你想添加额外的机器,您可能需要将图像决绝到一个单独的机器或复制所有图像。这也意味着你要添加一个瓶颈:你必须要管理自己上传的过程,要么上传到所有的机器或一台机器对其进行管理。

It also makes it harder to scale: when you want to add additional machines, you either need to pull off the images to a separate machine or clone the images across all. This also means you're adding a bottleneck: you'll have to manage your own upload process that will either upload to all machines or have a single machine managing it.

我建议S3:它的设置和忘记。任意数量的机器可以并行执行上传和你并不真的需要通知的其他机器对上传。

I recommend S3: it's set and forget. Any number of machines can be performing uploads in parallel and you don't really need to notify other machines about the upload.

另外,你可以在图像面前使用从S3直接下载亚马逊的Cloudfront作为一种廉价的CDN来代替。

In addition, you can use Amazon Cloudfront as a cheap CDN in front of the images instead of directly downloading from S3.

这篇关于我要坚持在EBS或S3图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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