Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I persist images on EBS or S3?

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

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. Save uploaded images to EBS volume.
  2. Use the S3 service.

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

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

  • 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 plus: Serving statics from EBS may result I/O cost, probably it will be minor.

  • EBS plus: People say EBS is faster.

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

  • 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.

Thanks

like image 755
enesness Avatar asked Feb 18 '10 12:02

enesness


People also ask

Is S3 good for storing images?

The more efficient and cost-effective option is to use AWS's S3 service for storing the image files. Using S3 is a very low-cost option. Effectively, all you are paying for is transferring files into an S3 bucket and serving those images to your users.

Is S3 better than EBS?

Simple storage service (S3) can store large amounts as compared to EBS. With S3, the standard limit is of100 buckets and each bucket has got an unlimited data capacity whereas EBS has a standard limit of 20 volumes and each volume can hold data up to 1TB. In EBS there occurs an upper limit on the data storage.

Where should I store images in AWS?

For storing static files like images AWS S3 is one of the best option. S3 is one of the cheapest cloud storage, you won't be charged for the number of times it's read, only amount of outbound traffic will bbe charged.


1 Answers

The price comparison is not quite right: S3 charges are $0.14 per GB USED, whereas EBS charges are $0.10 per GB PROVISIONED (the size of your EBS volume), whether you use it or not. As a result, S3 may or may not be cheaper than EBS.

like image 108
Kai Pommerenke Avatar answered Sep 22 '22 20:09

Kai Pommerenke